articles/lisp.md: update
This commit is contained in:
parent
07b6113414
commit
21744e57a1
1 changed files with 17 additions and 0 deletions
|
@ -60,6 +60,23 @@ Creating lists:
|
||||||
(list 20 "Lisp" '(1 2) 39)
|
(list 20 "Lisp" '(1 2) 39)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Of course, cons cells are not limited to just lists, they can be nested and represent trees. Just read any Lisp source code for proof,
|
||||||
|
you're seeing the source encoded in a tree, directly by using S-Expressions. But here is something more immediate:
|
||||||
|
```lisp
|
||||||
|
;; (20 * 2 + 16) / 30 * 5
|
||||||
|
;; (cons '* (cons (cons '/ (cons (cons (cons '+ (cons '* (cons 20 2)) 16)) 30)) 5))
|
||||||
|
;;
|
||||||
|
;; (*)
|
||||||
|
;; / \
|
||||||
|
;; (/) 5
|
||||||
|
;; / \
|
||||||
|
;; (+) 30
|
||||||
|
;; / \
|
||||||
|
;; (*) 16
|
||||||
|
;; / \
|
||||||
|
;; 20 2
|
||||||
|
```
|
||||||
|
|
||||||
## Lisp languages in use
|
## Lisp languages in use
|
||||||
- [Scheme](scheme.md): created by the hackers Guy Steele and Gerald Sussman in 1975 at the MIT.
|
- [Scheme](scheme.md): created by the hackers Guy Steele and Gerald Sussman in 1975 at the MIT.
|
||||||
- [Common Lisp](common_lisp.md): Big for Lisp standards (still better and smaller than "modern" languages), is also the most used Lisp today.
|
- [Common Lisp](common_lisp.md): Big for Lisp standards (still better and smaller than "modern" languages), is also the most used Lisp today.
|
||||||
|
|
Loading…
Add table
Reference in a new issue