Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
(if (= 1 1) :yes :no) ; returns :yes
(if (= 1 2) :yes :no) ; returns :no
(if (= 1 2) :yes) ; returns nil

View file

@ -0,0 +1,4 @@
(when x
(print "hello")
(println " world")
5) ; when x is logical true, prints "hello world" and returns 5; otherwise does nothing, returns nil

View file

@ -0,0 +1,6 @@
(cond
(= 1 2) :no) ; returns nil
(cond
(= 1 2) :no
(= 1 1) :yes) ; returns :yes

View file

@ -0,0 +1,3 @@
(cond
(= 1 2) :no
:else :yes) ; returns :yes

View file

@ -0,0 +1,5 @@
(condp < 3
4 :a ; cond equivalent would be (< 4 3) :a
3 :b
2 :c
1 :d) ; returns :c

View file

@ -0,0 +1,4 @@
(condp < 3
4 :a
3 :b
:no-match) ; returns :no-match

View file

@ -0,0 +1,4 @@
(case 2
0 (println "0")
1 (println "1")
2 (println "2")) ; prints 2.