Yeah, it's explained in the reference manual: https://software-lab.de/doc/ref.html#ev
Picolisp's evaluation strategy treats any list as a function to be interpreted. If first element of the list evaluates to a lambda expression, that is interpreted as a function. a *lambda expression*. A lambda expression is a list, whose CAR is either a symbol or a list of symbols, and whose CDR is a list of expressions. Note: In contrast to other Lisp implementations, the symbol LAMBDA itself does not exist in PicoLisp but is implied from context. A lambda function would be a no-op in picolisp because there is no compiling or creation of closures. Picolisp is dynamically scoped. The dotted pair syntax (a . b) refers to the car and cdr of a list. if a and b are both atoms, (a . b) is a list whose cdr is an atom. The list (a b) can be represented as (a . (b . NIL). So, (quote a) gives you a, (quote (a)) gives you (a). Hope this helps a bit. Alex would probably have a lot more to say. John On Thu, Feb 6, 2020 at 12:20 PM Lawrence Bottorff <[email protected]> wrote: > I've been a passive observer for a while, but now I'm really trying to > grok picolisp. So let's start with the FAQ bit about *I cannot find the > LAMBDA keyword in PicoLisp. *The example is basically syntax sugar for > > ((quote (X Y) (+ X Y)) 3 4) > > but this can't be made to work in a Common Lisp--or can it and I'm just > not doing it right? As I understand it, you have a different sort of quote > than CL, correct? Could you explain or point me to the docs on that? Also, > when I looked up quote in the ref I see this > > *(quote . any) -> any* > Returns any unevaluated.... > > What does the dotted cons notation mean? I know I have to lengthen my > comp-sci stride to grok picolisp, but I might be here with a lot of newbie > questions for a while. . . . > > Thanks, > Lawrence Bottorff > Grand Marais, MN, USA > -- John Duncan
