picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 1febedd640c35bcf634f0047f6e0d76884a5f2ad
parent b693b830bec4d88cebb907f4e1fc70b3c98f9740
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 11 Jul 2012 09:06:23 +0200

Added DO* example to FAQ
Diffstat:
Mdoc/faq.html | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/doc/faq.html b/doc/faq.html @@ -557,6 +557,20 @@ where you need macros in other Lisps are directly expressible as functions in PicoLisp, which (as opposed to macros) can be applied, passed around, and debugged. +<p>For example, Common Lisp's <code>DO*</code> macro, written as a function: + +<pre><code> +(de do* "Args" + (bind (mapcar car (car "Args")) + (for "A" (car "Args") + (set (car "A") (eval (cadr "A"))) ) + (until (eval (caadr "Args")) + (run (cddr "Args")) + (for "A" (car "Args") + (and (cddr "A") (set (car "A") (run @))) ) ) + (run (cdadr "Args")) ) ) +</code></pre> + <p><hr> <h2><a name="strings">Why are there no strings?</a></h2>