Memory hacker sector1/7/2023 Return Car(x) = Car(Cdr(x)) ? ATOM_T : NIL The Apply() part of the evaluator has a special case for recognizing this, which causes evaluation of the first argument to terminate: So it's simply inlined into the expression. The only difference is that, since it's the root-level program, the binding of the name PROGRAM can't have happened yet. Is the same syntax as a normal function call: The first item in the list is evaluated, just like the other items in the list. We did that originally, but deemed it non-essential and was removed, since that would have made it much harder to hit the 512-byte goal. ), it just lets it pass through, so you don't need the quotes. Now it's possible to add extra code to the evaluator so that if a naked lambda is encountered, i.e. This was all non-obvious to me, even after using LISP casually for years, since we normally don't write code that way. The process of evaluation causes the expression the clamp in on itself where the args get digested into an association list which can be referenced and then the payload is evaluated. This is the "venus fly trap" that the blog post mentions. The original evaluator is defined so that if the first item of a list, is a list whose first item is LAMBDA, then what it does is it calls Evlis() and Pairlis() which is sort of like a glorified version of Python's zip() function, to attach all the subsequent list items to the parameter name list.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |