Re: Fully lazy sequences are here!

2009-02-18 Thread Stefan Rusek
On Wed, Feb 18, 2009 at 8:02 PM, Rich Hickey wrote: > > > > On Feb 18, 12:20 pm, Frantisek Sodomka wrote: >> How should I say it... It just didn't look "symmetrical" to me. >> >> So, basically, there is a difference between functions returning >> sequences - depending on if they are lazy or eage

Re: Clojure on CLR/DLR

2009-02-17 Thread Stefan Rusek
ce is that Xronos is released under the BSD license instead of the Eclipse Public License. --Stefan Rusek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Re: Fully lazy sequences are coming - feedback wanted!

2009-02-15 Thread Stefan Rusek
At first I found this kind of confusing, but after reading Chouser's article and the help. It makes a lot of sense. I found it easiest to understand when I thought about it as two pairs of related names. The first/rest pair and the seq/more pair. --~--~-~--~~~---~--~---

Strings as functions of maps

2008-12-11 Thread Stefan Rusek
If we have the following map: (def m {:key 1 'sym 2 "str" 3}) The following are equivalent: (:key m) (m :key) As are the following: ('sym m) (m 'sym) I think the commutativity of maps with symbols and keywords is a valuable and good thing. I realize that the String class doesn't implement th

Re: Testing for lists, vectors, ...

2008-11-16 Thread Stefan Rusek
lists, vecotrs, and hashes all have an empty() method, so (defn clone-coll ([coll clone-item] (clone-item (seq coll) coll clone-item)) ([seq coll clone-item] (if (not seq) (.empty coll) (cons (clone-item (first seq)) (clone-coll (rest seq) coll clone- item)) ) ) ) will