aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/pipe.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/pipe.lux')
-rw-r--r--stdlib/source/library/lux/control/pipe.lux16
1 files changed, 4 insertions, 12 deletions
diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux
index 54b0fca51..2221505af 100644
--- a/stdlib/source/library/lux/control/pipe.lux
+++ b/stdlib/source/library/lux/control/pipe.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except let cond if exec case)
+ [lux (.except let cond if exec when)
[abstract
["[0]" monad]]
[control
@@ -65,14 +65,6 @@
[(,* else)]
(, prev)))))))
-(def .public when
- (syntax (_ [test ..body
- then ..body
- prev <code>.any])
- (in (list (` (..cond [(,* test)] [(,* then)]
- []
- (, prev)))))))
-
(def .public while
(syntax (_ [test ..body
then ..body
@@ -88,7 +80,7 @@
steps (<>.some ..body)
prev <code>.any])
(with_symbols [g!temp]
- (.case (list.reversed steps)
+ (.when (list.reversed steps)
(list.partial last_step prev_steps)
(.let [step_bindings (monad.do list.monad
[step (list.reversed prev_steps)]
@@ -117,10 +109,10 @@
[(,* (list#each (function (_ body) (` (|> (, g!temp) (,* body))))
paths))])))))))
-(def .public case
+(def .public when
(syntax (_ [branches (<>.many (<>.and <code>.any <code>.any))
prev <code>.any])
- (in (list (` (.case (, prev)
+ (in (list (` (.when (, prev)
(,* (|> branches
(list#each (function (_ [pattern body]) (list pattern body)))
list#conjoint))))))))