aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
authorEduardo Julian2017-11-06 18:33:32 -0400
committerEduardo Julian2017-11-06 18:33:32 -0400
commit4e932a33ac56bb3cb1d7b49771e770e8c373bf8e (patch)
tree638f6625ff5d79a424edbe657c27154b308ed37b /stdlib/source
parent88006e957373bbd72ec68897474303964885fc68 (diff)
- Improved "let>"'s design.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/control/pipe.lux11
1 files changed, 4 insertions, 7 deletions
diff --git a/stdlib/source/lux/control/pipe.lux b/stdlib/source/lux/control/pipe.lux
index 6f7721cf6..f2a6950fb 100644
--- a/stdlib/source/lux/control/pipe.lux
+++ b/stdlib/source/lux/control/pipe.lux
@@ -26,15 +26,12 @@
_
(undefined)))
-(syntax: #export (let> lhs [body body^] prev)
+(syntax: #export (let> binding body prev)
{#;doc (doc "Gives a name to the piped-argument, within the given expression."
(|> 5
- (let> X [(i.+ X X)])))}
- (wrap (list (L/fold (function [next prev]
- (` (let [(~ lhs) (~ prev)]
- (~ next))))
- prev
- body))))
+ (let> X (i.+ X X))))}
+ (wrap (list (` (let [(~ binding) (~ prev)]
+ (~ body))))))
(syntax: #export (cond> [branches (p;many (p;seq body^ body^))]
[?else (p;maybe body^)]