Content deleted Content added
Lisp "popularity contests"? |
Removing misleading section for discussion |
||
Line 147:
--[[User:Ryguasu|Ryguasu]] 19:02, 6 May 2004 (UTC)
----
I've removed this section for discussion. Despite the conversation above, it really isn't clear to me what was originally meant by it, and it's been pointed out as misleading. --[[User:Fubar Obfusco|FOo]] 00:06, 8 Jul 2004 (UTC)
== Minimal Lisp ==
A minimal Lisp needs just a few functions implemented in an underlying language (such as [[machine language]], or C on Unix systems):
* ''car'' -- given a pair, return the first element;
* ''cdr'' -- given a pair, return the second element;
* ''cons'' -- construct a new pair with given first and second elements;
* ''quote'' -- denote an expression as literal, not to be interpreted;
* ''eq'' -- compare two objects for equality, returning true or false values;
* ''if'' or ''cond'' -- a single- or multiple-condition branch operation; and
* some mechanism to define functions, such as Common Lisp's ''defun'', or else ''lambda'' and Scheme's ''define''.
All the other functions may be implemented in terms of these -- albeit not very efficiently. Actual Lisp systems implement a much larger set of functions than this.
[ Bogus misinformation above. Given only these functions, you cannot even lexically scan a parenthesized expression, never mind evaluate it and print it. You have no symbol table management, no numeric tower, no string handlnig, nothing. ]
|