Hi Lawrence, > I've been a passive observer for a while, but now I'm really trying to grok > picolisp.
Welcome! :) > 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? 'quote' cannot be used in Common Lisp that way. It works in PicoLisp, because of the equivalence if code and data. The list ((X Y) (+ X Y)) is a function in PicoLisp, and the expression (quote (X Y) (+ X Y)) returns that list. > As I understand it, you have a different sort of quote than > CL, correct? Yes. All other Lisps I know of follow the syntax (quote any), i.e. 'quote' is a function which takes a *single* argument and returns it unevaluated. What they do is taking the CADR of (quote any), resulting in 'any'. PicoLisp, on the other hand, follows the synax > *(quote . any) -> any* This means,it takes the CDR, resulting in 'any'. So (quote a b c) - which is (quote . (a b c)) - returns (a b c). > What does the dotted cons notation mean? I know I have to lengthen my It is the notation for a cell, separating CAR and CDR. So in PicoLisp, (quote . a) is a single cell, while in other Lisps you need (quote a) which is (quote . (a)), which takes two cells. > comp-sci stride to grok picolisp, but I might be here with a lot of newbie > questions for a while. . . . No problem! Please don't hesitate to ask! :) ☺/ A!ex -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
