No you didn't misunderstand Alex....I guessed the necessity for "for" when the extracted line gave an error but didn't understand why. Your referral to "for"s documentation explained though I had to play with some examples to drum it in :). Cristophe's examples were very helpful too because although I suppose I understand "if true then exit for" in the middle of a loop I need a lot more exposure to the lisp and picolisp way of doing things. The above discussion between the two of you is certainly giving me that exposure . Thank you. Dean
On 24 November 2016 at 17:10, Alexander Burger <a...@software-lab.de> wrote: > Hi Christophe, > > > >> : (T (== 1 1) T) > > >> !? (T (== 1 1) T) > > >> T -- Undefined > > > > Hi Alex, I'm not sure that you understood Dean's question. > > Or maybe I didn't understand your answer. > > Not sure. I hope I didn't misunderstand ;) > > > > What Dean did: > > To understand your definition of mmbr, Dean extracted this line: > > (T (== 1 1) T) > > from the «for». Bad luck, the «for» function is what is called in some > lisps > > a «special form»: its arguments are not evaluated. > > I think that in picoLisp it's called an f-expression. > > Right. An "FEXPR function", to be exact. > > However, the expressions in the *body* of 'loop', 'for' and other flow > functions are normal s-expressions evaluated the normal way, one after > the other, *but* with special handling if the CAR is T or NIL (exit > conditions). > > > > and done «manually». > > > > Some examples in picoLisp: > > > > : (de f (x) x) # could have been defined with setq or set > > Side note, Please don't forget upper case here! (de f (X) X) > > > > > The «for» function kind of inspects its args to find «clauses» > > and treat them specially, not as usual function calls. > > That's why brutally extracting them from > > the «for» construct doesn't work. > > Exactly. > > > > An example of this kind is the «let» construct: > > > > : (let (X "Hello" Y "world") (prinl X " " Y)) > > Hello world > > Here X is not a function but a symbol to which "Hello" is bound. > > Yes, 'let' is good example. > > In summary: As data and code are equivalent, it depends on the context > what it is. > > ♪♫ Alex > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >