Re: What's the idiomatic way to parse a binding form

2010-01-12 Thread Meikel Brandmeyer
Hi, On Jan 12, 12:12 pm, Jarkko Oranen wrote: > > What's the idiomatic Clojure way for extracting values/keys from a > > binding form vector [key1 val1 key2 val2..] ? > > I suppose that depends on what you want, but: > > (apply hash-map keyvals) to make a map or > (map first (partition 2 keyvals

Re: What's the idiomatic way to parse a binding form

2010-01-12 Thread Gabi
I only need the simple way. To get a vector and to treats it as a set of key/vals. So, Jarkko's solution is what I was looking for. (apply hash-map keyvals) On Jan 12, 5:49 pm, samppi wrote: > Do you also want the binding to act like let's, with unpacking of > vectors and maps? > > If so, there's

Re: What's the idiomatic way to parse a binding form

2010-01-12 Thread samppi
Do you also want the binding to act like let's, with unpacking of vectors and maps? If so, there's no public function that I know of that's set apart for doing this—are you trying to do this in a function or a macro? If you're creating a macro, then it's easy: just splice the binding form into a l

Re: What's the idiomatic way to parse a binding form

2010-01-12 Thread Jarkko Oranen
On Jan 12, 11:08 am, Gabi wrote: > What's the idiomatic Clojure way for extracting values/keys from a > binding form vector [key1 val1 key2 val2..] ? I suppose that depends on what you want, but: (apply hash-map keyvals) to make a map or (map first (partition 2 keyvals)) & (map second (partition

What's the idiomatic way to parse a binding form

2010-01-12 Thread Gabi
What's the idiomatic Clojure way for extracting values/keys from a binding form vector [key1 val1 key2 val2..] ? -- 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 me