#clojure log - Jul 05 2008

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

12:42 kotarak: Does for also do destructuring?

12:42 Chouser: I think so

12:43 yes

12:43 (for [[a b] [[1 2] [3 4]]] [b a]) => ([2 1] [4 3])

12:49 kotarak: Chouser: thanks, was missing a set of parentheses at the apropriate places. stupid me.

14:35 hoeck: damn it, reddit is down, i actually have to _do_ some programming instead of just reading about, BTW, some clojurainian here owning a tabletpc?

20:05 albino: Is there an example somewhere of taking input from stdin? Should I solve that the same way I would in java?

20:49 sage_joch: albino: try (read-line)

20:52 albino: sage_joch: thanks

21:38 Nafai: Is there a way to load a file from the REPL?

21:38 i.e., I want to run the REPL and then load a file so I can play around with the functions defined in it

21:38 albino: (load-file)

21:39 err (load-file "/path/to/yourfile.clj")

21:41 Nafai: Thanks

22:19 albino: How can I do an infinite loop? (while true (println "clojure rules"))

22:20 can range count to infinity?

22:26 Chouser: (take 10 (iterate inc 0))

22:28 albino: Chouser: thanks

22:55 * Nafai sighs

22:57 Nafai: Are there any good simple examples out there of functions written in clojure?

22:57 Like the classic fibonacci, etc?

23:10 Chouser: http://en.wikibooks.org/wiki/Clojure_Programming#Examples

23:10 scroll down a bit for a couple fibonacci examples.

Logging service provided by n01se.net