alisp:syntax
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
alisp:syntax [2006/11/02 09:22] – external edit 127.0.0.1 | alisp:syntax [2018/06/23 00:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Syntax of ALisp ====== | + | dHb6vv , [url=http:// |
- | + | ||
- | [[About | ALisp]] syntax is very similar to that of any other Lisp. It is designed to be very simple, but sometimes it looks more complex because of the number of parentheses involved. | + | |
- | + | ||
- | ALisp code and data are written with the same syntax. | + | |
- | + | ||
- | The evaluator takes this object and evaluates it based on the following rules: | + | |
- | - If the object is a symbol, look up the value of the symbol. | + | |
- | - If the object is a list, evaluate the first item in the list. If that item evaluates to a procedure or closure, evaluate the rest of the items in the list and apply that function call to them. If it evaluates to a macro or user-defined macro, pass the rest of the items in the list to that macro unevaluated. | + | |
- | - If the object is of any other type, it evaluates to itself. | + | |
- | + | ||
- | The last item evaluated is returned as the value of the program and printed. | + |
alisp/syntax.1162477354.txt.gz · Last modified: 2018/06/23 00:30 (external edit)