mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[hy/en] drop square brackets for conditionals (#4908)
This commit is contained in:
parent
a41ac723ae
commit
8fb3356473
@ -159,12 +159,9 @@ True ; => True
|
|||||||
|
|
||||||
; nest multiple if else if clauses with cond
|
; nest multiple if else if clauses with cond
|
||||||
(cond
|
(cond
|
||||||
[(= someval 42)
|
(= someval 42) (print "Life, universe and everything else!")
|
||||||
(print "Life, universe and everything else!")]
|
(> someval 42) (print "val too large")
|
||||||
[(> someval 42)
|
(< someval 42) (print "val too small"))
|
||||||
(print "val too large")]
|
|
||||||
[(< someval 42)
|
|
||||||
(print "val too small")])
|
|
||||||
|
|
||||||
; group statements with do, these are executed sequentially
|
; group statements with do, these are executed sequentially
|
||||||
; forms like defn have an implicit do
|
; forms like defn have an implicit do
|
||||||
|
Loading…
Reference in New Issue
Block a user