diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/control/pipe.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux index 8f36f8a41..7e551f43c 100644 --- a/stdlib/source/library/lux/control/pipe.lux +++ b/stdlib/source/library/lux/control/pipe.lux @@ -24,7 +24,7 @@ (Parser (List Code)) (s.tuple (p.some s.any))) -(syntax: #export (new> start +(syntax: .public (new> start {body body^} prev) {#.doc (doc "Ignores the piped argument, and begins a new pipe." @@ -35,7 +35,7 @@ (new> 0 [inc]))))} (in (list (` (|> (~ start) (~+ body)))))) -(syntax: #export (let> binding body prev) +(syntax: .public (let> binding body prev) {#.doc (doc "Gives a name to the piped-argument, within the given expression." (n.= 10 (|> 5 @@ -48,7 +48,7 @@ (function (_ tokens) (#e.Success [(list.reversed tokens) []]))) -(syntax: #export (cond> {_ _reversed_} +(syntax: .public (cond> {_ _reversed_} prev {else body^} {_ _reversed_} @@ -67,7 +67,7 @@ (` (|> (~ g!temp) (~+ then)))))) (|> (~ g!temp) (~+ else))))))))) -(syntax: #export (if> {test body^} {then body^} {else body^} prev) +(syntax: .public (if> {test body^} {then body^} {else body^} prev) {#.doc (doc "If-branching." (is? (if (n.even? sample) "even" @@ -80,7 +80,7 @@ [(~+ else)] (~ prev)))))) -(syntax: #export (when> {test body^} {then body^} prev) +(syntax: .public (when> {test body^} {then body^} prev) {#.doc (doc "Only execute the body when the test passes." (is? (if (n.even? sample) (n.* 2 sample) @@ -92,7 +92,7 @@ [] (~ prev)))))) -(syntax: #export (loop> {test body^} +(syntax: .public (loop> {test body^} {then body^} prev) {#.doc (doc "Loops for pipes." @@ -106,7 +106,7 @@ ((~' recur) (|> (~ g!temp) (~+ then))) (~ g!temp)))))))) -(syntax: #export (do> monad +(syntax: .public (do> monad {steps (p.some body^)} prev) {#.doc (doc "Monadic pipes." @@ -130,7 +130,7 @@ _ (in (list prev))))) -(syntax: #export (exec> {body body^} +(syntax: .public (exec> {body body^} prev) {#.doc (doc "Non-updating pipes." "Will generate piped computations, but their results will not be used in the larger scope." @@ -142,7 +142,7 @@ (exec (|> (~ g!temp) (~+ body)) (~ g!temp)))))))) -(syntax: #export (tuple> {paths (p.many body^)} +(syntax: .public (tuple> {paths (p.many body^)} prev) {#.doc (doc "Parallel branching for pipes." "Allows to run multiple pipelines for a value and gives you a tuple of the outputs." @@ -156,7 +156,7 @@ [(~+ (list\map (function (_ body) (` (|> (~ g!temp) (~+ body)))) paths))])))))) -(syntax: #export (case> {branches (p.many (p.and s.any s.any))} +(syntax: .public (case> {branches (p.many (p.and s.any s.any))} prev) {#.doc (doc "Pattern-matching for pipes." "The bodies of each branch are NOT pipes; just regular values." |