Merge branch 'master' into feat/math-extension
This commit is contained in:
19
examples/arrays.lisp
Normal file
19
examples/arrays.lisp
Normal 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
11
examples/logic.lisp
Normal 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"))
|
||||
)
|
||||
Reference in New Issue
Block a user