#clojure logs

2008-07-05

12:42kotarakDoes for also do destructuring?
12:42ChouserI think so
12:43Chouseryes
12:43Chouser(for [[a b] [[1 2] [3 4]]] [b a]) => ([2 1] [4 3])
12:49kotarakChouser: thanks, was missing a set of parentheses at the apropriate places. stupid me.
14:35hoeckdamn it, reddit is down, i actually have to _do_ some programming instead of just reading about, BTW, some clojurainian here owning a tabletpc?
20:05albinoIs there an example somewhere of taking input from stdin? Should I solve that the same way I would in java?
20:49sage_jochalbino: try (read-line)
20:52albinosage_joch: thanks
21:38NafaiIs there a way to load a file from the REPL?
21:38Nafaii.e., I want to run the REPL and then load a file so I can play around with the functions defined in it
21:38albino(load-file)
21:39albinoerr (load-file "/path/to/yourfile.clj")
21:41NafaiThanks
22:19albinoHow can I do an infinite loop? (while true (println "clojure rules"))
22:20albinocan range count to infinity?
22:26Chouser(take 10 (iterate inc 0))
22:28albinoChouser: thanks
22:57NafaiAre there any good simple examples out there of functions written in clojure?
22:57NafaiLike the classic fibonacci, etc?
23:10Chouserhttp://en.wikibooks.org/wiki/Clojure_Programming#Examples
23:10Chouserscroll down a bit for a couple fibonacci examples.