Re: "wrong number of args" with nested map

2010-04-19 Thread Peter Salvi
Also the function (defn foo [map1 map2] (map map2 (keys map1))) seems to be a bit more clear. Peter -- 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 m

Re: Multimethods & derive

2009-06-08 Thread Peter Salvi
On Jun 8, 3:51 pm, Konrad Hinsen wrote: > See also my patch that creates such a universal root type [...] Nice! That's exactly what I was thinking about Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cloju

Multimethods & derive

2009-06-07 Thread Peter Salvi
Hi, I would like to use multimethods by dispatching on keys of the variables (maps) in a way that I sometimes have constraints on only some of the arguments. In common lisp I would say (defgeneric foo (a b)) (defmethod foo ((a bar) b) ...) (defmethod foo (a (b baz)) ...) (defmethod foo ((a bar)