Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
(if (= 1 1) :yes :no) ; returns :yes
|
||||
|
||||
(if (= 1 2) :yes :no) ; returns :no
|
||||
|
||||
(if (= 1 2) :yes) ; returns nil
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
(cond
|
||||
(= 1 2) :no) ; returns nil
|
||||
|
||||
(cond
|
||||
(= 1 2) :no
|
||||
(= 1 1) :yes) ; returns :yes
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(cond
|
||||
(= 1 2) :no
|
||||
:else :yes) ; returns :yes
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(condp < 3
|
||||
4 :a ; cond equivalent would be (< 4 3) :a
|
||||
3 :b
|
||||
2 :c
|
||||
1 :d) ; returns :c
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(condp < 3
|
||||
4 :a
|
||||
3 :b
|
||||
:no-match) ; returns :no-match
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(case 2
|
||||
0 (println "0")
|
||||
1 (println "1")
|
||||
2 (println "2")) ; prints 2.
|
||||
Loading…
Add table
Add a link
Reference in a new issue