On Wed, Nov 5, 2008 at 12:10 AM, Chouser <[EMAIL PROTECTED]> wrote: > The attached patch allows: > > user=> (point 42 11) > {:x 42, :y 11}
The right tool for the job makes all the difference. Attached is a much simpler patch to accomplish the same thing. --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
commit f107e22f4cf3447543310f6b157b36dcad7ae4cd Author: Chouser <[EMAIL PROTECTED]> Date: Wed Nov 5 23:15:52 2008 -0500 PersistentStructMap$Def extends RestFn diff --git a/src/jvm/clojure/lang/PersistentStructMap.java b/src/jvm/clojure/lang/PersistentStructMap.java index 055448c..a54b683 100644 --- a/src/jvm/clojure/lang/PersistentStructMap.java +++ b/src/jvm/clojure/lang/PersistentStructMap.java @@ -18,14 +18,19 @@ import java.io.Serializable; public class PersistentStructMap extends APersistentMap{ -public static class Def implements Serializable{ +public static class Def extends RestFn implements Serializable{ final ISeq keys; final IPersistentMap keyslots; Def(ISeq keys, IPersistentMap keyslots){ + super(0); this.keys = keys; this.keyslots = keyslots; } + + protected Object doInvoke(Object args) throws Exception{ + return construct(this, (ISeq)args); + } } final Def def;