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

Currying considered useless

Name: Anonymous 2007-06-20 0:11 ID:OhxqYAeK

(defmacro p/ (f &rest body)
    (let ((args (gensym)))
        `(lambda (&rest ,args)
            (apply #',f (append ',body ,args)))))   


usage:

(mapcar (p/ + 1) '(1 2 3)) --> (2 3 4)

alternate syntax, with the help of a few read macros

(mapcar #[+ 1] '(1 2 3))

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