mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 15:51:41 +03: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
|
||||
(cond
|
||||
[(= someval 42)
|
||||
(print "Life, universe and everything else!")]
|
||||
[(> someval 42)
|
||||
(print "val too large")]
|
||||
[(< someval 42)
|
||||
(print "val too small")])
|
||||
(= someval 42) (print "Life, universe and everything else!")
|
||||
(> someval 42) (print "val too large")
|
||||
(< someval 42) (print "val too small"))
|
||||
|
||||
; group statements with do, these are executed sequentially
|
||||
; forms like defn have an implicit do
|
||||
|
Loading…
Reference in New Issue
Block a user