Re: Problem: Multimethod Dispatch Function

2010-04-15 Thread kreso
Hi, > (defmulti new-obj #(:_fenrir_class-name %)) You defined your function as #(:_fenrir_class-name %), so it will take only one argument. > However, when I call the multimethod with something like this: > > (new-obj fGameObject :location 'a-loc :sprite 'a-sprite) > > I get this error: > > 1:14

Problem: Multimethod Dispatch Function

2010-04-14 Thread Eduardo Julian
I'm working on an object system called Fenrir, and one of the functions in my library, called new-obj, is used to make instances of classes: (defmulti new-obj #(:_fenrir_class-name %)) (defmethod new-obj ::fObject [fclass & kvals] (with-meta (apply struct-map (conj kvals (:_fenrir_struct f