This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
its_lisp [2020/04/15 20:30] smj |
its_lisp [2020/04/15 21:11] smj |
||
---|---|---|---|
Line 51: | Line 51: | ||
//The LISP ... Editor ... LISP ... loop will no doubt be repeated many times.// | //The LISP ... Editor ... LISP ... loop will no doubt be repeated many times.// | ||
+ | |||
+ | **HELLO WORLD and LOOP examples** | ||
+ | |||
+ | | ||
+ | |||
+ | LISP 2122 ; MACLISP Version 2122 | ||
+ | | ||
+ | |||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | LISP 2122 | ||
+ | | ||
+ | |||
+ | |||
+ | * | ||
+ | (loop for x in '(a b c d e) ; Call the macro " | ||
+ | do (print x)) ; DO a PRINT of the value of " | ||
+ | ; | ||
+ | ; | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ; left to PRINT in the list of "a b c d e" | ||
+ | |||
+ | **MATH examples** | ||
+ | |||
+ | | ||
+ | |||
+ | LISP 2122 | ||
+ | | ||
+ | |||
+ | |||
+ | | ||
+ | (+ 2 2) | ||
+ | 4 | ||
+ | (- 2 2) | ||
+ | 0 | ||
+ | (* 2 2) | ||
+ | 4 |