Skip to content

Commit

Permalink
[hy/en] drop square brackets for conditionals (#4908)
Browse files Browse the repository at this point in the history
  • Loading branch information
driftsignal authored Apr 25, 2024
1 parent a41ac72 commit 8fb3356
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions hy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fb3356

Please sign in to comment.