whenLet, unlessLet
This commit is contained in:
@@ -447,9 +447,11 @@
|
||||
(Some b) some6]
|
||||
(Assert.equals 11 (+ a b))
|
||||
(Assert.fail))
|
||||
(ifLet [(Some a) oops]
|
||||
(Assert.fail))
|
||||
(ifLet [(Some (or 5 6)) some5]
|
||||
(Assert.pass))
|
||||
(ifLet [(Some a) none]
|
||||
(Assert.fail))
|
||||
(whenLet [(Some a) oops]
|
||||
(print "something went wrong!")
|
||||
(Assert.fail))
|
||||
(unlessLet [(Some (or 5 6)) some5]
|
||||
(print "something else went wrong!")
|
||||
(Assert.fail))))
|
Reference in New Issue
Block a user