Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Marco Baringer <mb@xxxxxxx>
- Date: Wed, 31 May 2006 01:50:27 +0200
JesusWaffle@xxxxxxxxx writes:
How about using a simple read-macro for this? Something along the lines
of:
(defun square-brace-reader (stream char)
(declare (ignore char))
`(funcall ,@(read-delimited-list #\] stream t)))
(set-macro-character #\[ #'square-brace-reader)
That will expand [foo bar] to (funcall foo bar), or [[(f x) y] z] to
(funcall (funcall (f x) y) z).
Hoan Ton-That has written a with-lisp1 macro which allows stuff like
this:
(with-lisp1
(let ((a +))
(a 2 3))) ==> 5
(with-lisp1
(let ((a (lambda (x)
(lambda (y)
(+ x y)))))
((a 2) 3))) ==> 5
see
http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/82994055009163e9
and the a recent version of arnesi
(http://common-lisp.net/project/bese/repos/arnesi_dev/) for the code.
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
.
- References:
- Relative merits of Lisp-1 vs. Lisp-2?
- From: JesusWaffle
- Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: Pascal Costanza
- Re: Relative merits of Lisp-1 vs. Lisp-2?
- From: JesusWaffle
- Relative merits of Lisp-1 vs. Lisp-2?
- Prev by Date: Re: Just can't hear enough about Cells?
- Next by Date: Re: Just can't hear enough about Cells?
- Previous by thread: Re: Relative merits of Lisp-1 vs. Lisp-2?
- Next by thread: Re: Relative merits of Lisp-1 vs. Lisp-2?
- Index(es):