[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Re: Yet another Smalltalk or Lisp discussion (Windows Centric

William James

11/6/2015 5:53:00 AM

Rob Warnock wrote:

> You mean like these?
>
> > (defmacro thunk (&body body) `(lambda () ,@body))
>
> THUNK
> > (defmacro fn (args &body body) `(lambda ,args ,@body))
>
> FN
> > (mapcar (fn (x y) (+ x y)) '(1 2 3 4) '(0 5 10 15))
>
> (1 7 13 19)
> >
>
> Or if you *insist* on getting all "syntaxy":
>
> > (mapcar #$(+ $1 $2) '(1 2 3 4) '(0 5 10 15))
>
> (1 7 13 19)

Gauche Scheme:

(map + '(1 2 3 4) '(0 5 10 15))
===>
(1 7 13 19)


(map (cut + <> <>) '(1 2 3 4) '(0 5 10 15))
===>
(1 7 13 19)

--
Viewed at its most abstract level, a fundamental agenda is thus to influence
the European-derived peoples of the United States to view concern about their
own demographic and cultural eclipse as irrational and as an indication of
psychopathology. --- Dr. Kevin MacDonald; "The Frankfurt School of Social
Research and the Pathologization of Gentile Group Allegiances"