On 1 Nov., 14:12, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Oct 31, 1:20 pm, André Thieme <[EMAIL PROTECTED]> wrote:
> > Here is what I tried:
>
> > user> (defn make-lyst [& items]
> > (proxy [clojure.lang.IPersistentList] []
> > (cons [obj] (cons obj this))
> >
On Oct 31, 1:20 pm, André Thieme <[EMAIL PROTECTED]> wrote:
> In #Clojure Rich mentioned today that we can define our own data
> structures on top of the existing ones.
> Maybe someone wants/needs his own version of vectors that rearrange
> automatically in some specific order or whatever.
>
> I
Hi André,
Am 31.10.2008 um 22:48 schrieb André Thieme:
Can anybody give a very simple/minimal implementation of lists/
vectors/
maps in Clojure?
A 5-20 lines (proxy ...) example that would allow me to say
(def a (make-lyst 1 2 3)) and run several list functions on it?
There is my lazy-map pac
Stuart Sierra schrieb:
> On Oct 31, 1:20pm, André Thieme <[EMAIL PROTECTED]> wrote:
> > But unfortunately (make-lyst 1 2 3) ==>
> > java.lang.ClassCastException: clojure.lang.Proxy__5307 cannot be cast
> > to clojure.lang.ISeq
> >
> > Any ideas how this should be done so that it will work?
>
> I t
On Oct 31, 1:20 pm, André Thieme <[EMAIL PROTECTED]> wrote:
> But unfortunately (make-lyst 1 2 3) ==>
> java.lang.ClassCastException: clojure.lang.Proxy__5307 cannot be cast
> to clojure.lang.ISeq
>
> Any ideas how this should be done so that it will work?
I think the problem here is that IPersis
In #Clojure Rich mentioned today that we can define our own data
structures on top of the existing ones.
Maybe someone wants/needs his own version of vectors that rearrange
automatically in some specific order or whatever.
If I now want to add something that works nearly like lists, but a
little