Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Cons cells in Java!

Name: Anonymous 2013-02-26 0:09

Finally, a way to enjoy LISP stuff in Java! Feel free to use this class I made however you wish, it's licensed as GPL.
public class Cons<T,U> {
    private T inner;
    private U outer;
   
    public T getCar() {
        return inner;
    }
    public void setCar(T inner) {
        this.inner = inner;
    }
    public U getCdr() {
        return outer;
    }
    public void setCdr(U outer) {
        this.outer = outer;
    }
    public void setCons(T inner, U outer)
    {
        setCar(inner);
        setCdr(outer);
    }   
}

Name: Anonymous 2013-02-26 1:40

)\n{
That isn't Java style!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List