Merge branch 'master' into feat/math-extension

This commit is contained in:
Лu Лinveгa
2019-07-14 09:12:13 +12:00
committed by GitHub
4 changed files with 102 additions and 0 deletions

19
examples/arrays.lisp Normal file
View File

@@ -0,0 +1,19 @@
(echo (map (lambda (a) (add a 1)) (1 2 3)))
(
(echo (first (1 2 3)))
(echo (rest (1 2 3)))
)
(echo
(filter
(lambda (a) (eq 0 (mod a 2)))
(1 2 3 4 5))
)
(
(clear)
(map (lambda (a)
(stroke (rect (mul a 30) 20 50 50) 1 "red"))
(5 10 15 20))
)

11
examples/logic.lisp Normal file
View File

@@ -0,0 +1,11 @@
(
(echo (lt 3 4))
(echo (and 1 2 true 4))
(echo (and 1 false 2))
(echo (or false false 2 false))
(if (gt 1 2) (echo "ok") (echo "not ok"))
)