Updating documentation for the new cond order
This commit is contained in:
parent
9416422330
commit
edf33a08b4
@ -213,9 +213,12 @@ called "cond". In python, you might do something like::
|
|||||||
In hy, you would do::
|
In hy, you would do::
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
(> somevar 50) (print "That variable is too big!")
|
((> somevar 50)
|
||||||
(< somevar 10) (print "That variable is too small!")
|
(print "That variable is too big!"))
|
||||||
true (print "That variable is jussssst right!"))
|
((< somevar 10)
|
||||||
|
(print "That variable is too small!"))
|
||||||
|
(true
|
||||||
|
(print "That variable is jussssst right!")))
|
||||||
|
|
||||||
What you'll notice is that cond switches off between a some statement
|
What you'll notice is that cond switches off between a some statement
|
||||||
that is executed and checked conditionally for true or falseness, and
|
that is executed and checked conditionally for true or falseness, and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user