Hi all, First off, thanks for clojure! I've been playing with it for a couple days now and love it!
Doing ruby in my day job, I've found some quirks I don't really understand. Most of them are obviously me being new to clojure and a lisp "beginner". But the following keeps bugging me: user> (partition 2 '(1 2 3 4 5)) ((1 2) (3 4)) Why is partition swallowing the remaining element of the given sequence? I expected partition to return ((1 2) (3 4) (5)). The current implementation of partition will ensure code expecting groups of a given size will not break when given an unevenly distributed sequence. But IMO that code is responsible for how partition is called and should sanitize if needed. The current implementation might even obscure one-off errors and silently drop data. Since the current implementation is slightly more complex than the more lenient version I expected, there's probably a good reason why it's implemented as it is now. Can anybody enlighten me? Regards, Remco --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---