Hi Ken, > user=> (let [[x y & more] [1 2 3 4 5]] [x y more]) > [1 2 (3 4 5)] > user=> (let [[x y z] [1 2 3 4 5]] [x y z]) > [1 2 3] > user=> (let [[_ _ a b] [1 2 3 4 5]] [a b]) > [3 4] > > You can grab any fixed position in this way, as well as a "rest" that > is the tail of the sequence past the last of such.
Right, that's true. However, Marek had given two examples of Python tuple unpacking, the first being: > first, *middle, last = sequence(...) Which I believe in Python 3 will bind 'first' to the first element, 'last' to the last element, and 'middle' to a sequence of all the elements in the middle. That last part is what I don't know how to do in Clojure. -- 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