Re: Clojure 1.0

2009-05-05 Thread Mikio Hokari
Congratulations! I'm loving and enjoying Clojure programming. Clojure is the most beautiful, practical and fun language I've ever seen. Thank you very much for your great work! Mikio 2009/5/5 tmountain : > > Congrats! I'm loving Clojure more all the time. Thank you for making > the Lisp I've bee

Re: how would I do this functionally? (internally mutable state)

2009-05-27 Thread Mikio Hokari
quot;abc") 2) result: A size abc B quickhash abc C hash abc D For memory efficiency, I suppose you may use state-monads and trie. But it will need a lot of lines of code, and too hard for me. Regards, - Mikio Hokari 2009/5/28 Korny Sietsma : > > Hi all, > > I

Re: how would I do this functionally? (internally mutable state)

2009-05-27 Thread Mikio Hokari
Hash calculation runs only when necessary, because Clojure's map function is lazy now. more sample code: (nth (get-info "a.txt") 0) (nth (get-info "b.txt") 0) (nth (get-info "b.txt") 1) result: size a.txt size b.txt quickhash b.txt Output result shows it. When (nth (get-info "a.txt") 0) is ev

Re: how would I do this functionally? (internally mutable state)

2009-05-27 Thread Mikio Hokari
>> I wonder if there is a more idiomatic way to compare two lazy >> sequences... lazily? You can just use =. (= seq1 seq2) It works lazily. user> (= (iterate inc 0) (map #(do (println %) %) [0 1 2 -3 4 5 6]) ) 0 1 2 -3 false How sweet! 2009/5/28 Daniel Lyons : > > > On May 27, 2009, at 11:5