[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loop macro
Date: 04 Feb 86 20:52:41 EST (Tue)
From: Liz Allen <firstname.lastname@example.org>
The mention of connecting words kind of puzzles me (and at the same
time helps me to understand the Lisp Machine loop macro). Our for
macro doesn't seem to need them (though it does use "by" and "until").
To explain how this works, let me give for's basic syntax:
(for [ let <let-var>* ]* ; <let-var> is <var> or (<var> <init>)
[ initially <form>* ]*
[ <iteration-spec>* ]* ; in, on, from, bind, being, etc
[ eachtime <form>* ]*
[ <termination-spec>* ]* ; while <form>* or until <form>*
[ <conditiion-spec>* ]* ; when <form>* or unless <form>*
[ <body-key> <form>* ] ; <body-key> is do, collect, etc
[ finally <form>* ] )
I'm not trying to say that Common Lisp should necessarily adopt
the Maryland for as its looping construct. I just trying to say
that there ought to be some way to get rid of the concept of
connecting words without having to put parens around all the
clauses... Can the syntax for the Lisp Machine Loop be simplified
along these lines without losing big?
What are "let", "initially", "eachtime", "in", "on", "from", "bind", "being",
"finally", in your macro, if not connecting words, or am I totally confused?