Question about map destrustures

2014-02-24 Thread bob
Hi, There is a function a (defn a [ {:as m}] (println m)) it accepts pair of params , for example (a :k 1 :j 2), however now I have a map {:k 1 :j 2}, the question is how to convert the map to be accepted by a? Thanks -- You received this message because you are subscribed to the

Re: Question about map destrustures

2014-02-24 Thread Kris Jenkins
Isn't it just: (defn a [m] (println m)) If you want access to the keys: (defn a [{:keys [k j] :as m}] (println k)) Kris On Monday, 24 February 2014 14:34:13 UTC, bob wrote: Hi, There is a function a (defn a [ {:as m}] (println m)) it accepts pair of params , for

Re: Question about map destrustures

2014-02-24 Thread Ambrose Bonnaire-Sergeant
Hi, There's no core function for this (would probably be called mapply). Try calling (apply concat m) on your map, then passing with (apply a (apply concat m)). Thanks, Ambrose On Mon, Feb 24, 2014 at 10:34 PM, bob wee@gmail.com wrote: Hi, There is a function a (defn a [ {:as

Re: Question about map destrustures

2014-02-24 Thread bob
Works, Thanks. On Monday, February 24, 2014 10:39:12 PM UTC+8, Ambrose Bonnaire-Sergeant wrote: Hi, There's no core function for this (would probably be called mapply). Try calling (apply concat m) on your map, then passing with (apply a (apply concat m)). Thanks, Ambrose On Mon,