aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/maybe.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/control/maybe.lux13
1 files changed, 4 insertions, 9 deletions
diff --git a/stdlib/source/library/lux/control/maybe.lux b/stdlib/source/library/lux/control/maybe.lux
index f760d517d..6ce448249 100644
--- a/stdlib/source/library/lux/control/maybe.lux
+++ b/stdlib/source/library/lux/control/maybe.lux
@@ -156,12 +156,7 @@
(.list)))
(def .public when
- (macro (_ tokens state)
- (.when tokens
- (.list test then)
- {.#Right [state (.list (` (.if (, test)
- (, then)
- {.#None})))]}
-
- _
- {.#Left "Wrong syntax for 'when'"})))
+ (template (_ <test> <then>)
+ [(if <test>
+ <then>
+ {.#None})]))