(ns clojure.examples.hello (:gen-class)) (defn hello-world [username] (println (format "Hello, %s" username))) (defn dziel-przez-zero [] (println (/ 1 0.0))) (hello-world "world") (dziel-przez-zero) (println *e) ; nowy zbiór (def visitors-old (atom #{})) (swap! visitors-old conj "Janku") (println (deref visitors-old)) (def visitors (atom #{})) (defn hello "Wywietla powitanie na wyjciu, uzywajac nazwy uzytkownika. Potrafi stwierdzi, e korzysta juz z programu." [username] (swap! visitors conj username) (println (str "Witaj, " username)) ) (hello "Marku") (hello "Pawle") (hello "Jurny")
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more