Why don't people like lisp?
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Thu Oct 23 15:14:42 EDT 2003
On Thu, 23 Oct 2003 12:11:30 -0400, Joe Marshall wrote:
> So if we extended Lisp, for example, I could write:
> (defun pythagorean-triples (n)
> (all-values
> (let ((opposite (an-integer-between 1 n))
> (adjacent (an-integer-between 1 n))
> (hypotenuse (an-integer-between 1 n)))
> (if (= (+ (* opposite opposite)
> (* adjacent adjacent))
> (* hypotenuse hypotenuse))
> (list opposite adjacent hypotenuse)
> (fail)))))
How to write such macros in Lisp? Looks like they would require non-local
rewriting of program structure, I don't see how it's possible at all.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Python-list
mailing list