Thank you all for your replies and your help. I never expected Rich Hickey would respond :-)
-- Clint On Aug 22, 9:07 am, Rich Hickey <richhic...@gmail.com> wrote: > On Sat, Aug 22, 2009 at 8:20 AM, Sean Devlin<francoisdev...@gmail.com> wrote: > > > Welcome to Clojure! > > > A String is a form of a Sequence, so the correct function is seq. > > I think we all need to be very careful about calling things sequences > which are not. seq can give you a sequential view of many things, but > that doesn't make those things sequences. Very few of the Clojure data > structures are actual sequences, e.g. vectors, maps, strings etc are > not. Nor do most Clojure collections implement the sequence (ISeq) > interface. They implement the Seqable interface, which means seq > works, and the thing that seq returns implements ISeq. The fact that > first/rest/other-sequence-fns work on most collections falls out of > the fact that they call seq on their args. > > It may seem like a nit, but I've seen a lot of confusion, e.g. people > listing The Sequence Types: Vector, Map etc. Each of the data > structures has important and unique characteristics (insertion, lookup > etc) when not used sequentially. It just makes a mess of the > abstractions to call them sequences. > > Rich --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---