aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
authorEduardo Julian2018-05-01 21:13:08 -0400
committerEduardo Julian2018-05-01 21:13:08 -0400
commite978beda66408179585fe271bfec1900f21df8b5 (patch)
tree46ace3d84621b00b7656254b8c644a9973eeccc1 /stdlib/source
parent62db6cd6ef35a8dc465538706f89e658db09661a (diff)
- Re-named lux/control/cont to lux/control/continuation.
Diffstat (limited to 'stdlib/source')
-rw-r--r--stdlib/source/lux/control/continuation.lux (renamed from stdlib/source/lux/control/cont.lux)0
-rw-r--r--stdlib/source/lux/data/coll/stream.lux20
2 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/control/cont.lux b/stdlib/source/lux/control/continuation.lux
index 35f549ee7..35f549ee7 100644
--- a/stdlib/source/lux/control/cont.lux
+++ b/stdlib/source/lux/control/continuation.lux
diff --git a/stdlib/source/lux/data/coll/stream.lux b/stdlib/source/lux/data/coll/stream.lux
index 3e76e9d5c..b6964d95f 100644
--- a/stdlib/source/lux/data/coll/stream.lux
+++ b/stdlib/source/lux/data/coll/stream.lux
@@ -3,7 +3,7 @@
(lux (control functor
monad
comonad
- [cont #+ pending Cont]
+ [continuation #+ pending Cont]
["p" parser])
[macro #+ with-gensyms]
(macro [code]
@@ -50,7 +50,7 @@
(do-template [<name> <return> <part>]
[(def: #export (<name> s)
(All [a] (-> (Stream a) <return>))
- (let [[h t] (cont.run s)]
+ (let [[h t] (continuation.run s)]
<part>))]
[head a h]
@@ -58,7 +58,7 @@
(def: #export (nth idx s)
(All [a] (-> Nat (Stream a) a))
- (let [[h t] (cont.run s)]
+ (let [[h t] (continuation.run s)]
(if (n/> +0 idx)
(nth (n/dec idx) t)
h)))
@@ -67,7 +67,7 @@
[(def: #export (<taker> pred xs)
(All [a]
(-> <pred-type> (Stream a) (List a)))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if <pred-test>
(list& x (<taker> <pred-step> xs'))
(list))))
@@ -75,7 +75,7 @@
(def: #export (<dropper> pred xs)
(All [a]
(-> <pred-type> (Stream a) (Stream a)))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if <pred-test>
(<dropper> <pred-step> xs')
xs)))
@@ -83,7 +83,7 @@
(def: #export (<splitter> pred xs)
(All [a]
(-> <pred-type> (Stream a) [(List a) (Stream a)]))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if <pred-test>
(let [[tail next] (<splitter> <pred-step> xs')]
[(#.Cons [x tail]) next])
@@ -102,7 +102,7 @@
(def: #export (filter p xs)
(All [a] (-> (-> a Bool) (Stream a) (Stream a)))
- (let [[x xs'] (cont.run xs)]
+ (let [[x xs'] (continuation.run xs)]
(if (p x)
(pending [x (filter p xs')])
(filter p xs'))))
@@ -119,14 +119,14 @@
## [Structures]
(struct: #export _ (Functor Stream)
(def: (map f fa)
- (let [[h t] (cont.run fa)]
+ (let [[h t] (continuation.run fa)]
(pending [(f h) (map f t)]))))
(struct: #export _ (CoMonad Stream)
(def: functor Functor<Stream>)
(def: unwrap head)
(def: (split wa)
- (let [[head tail] (cont.run wa)]
+ (let [[head tail] (continuation.run wa)]
(pending [wa (split tail)]))))
## [Pattern-matching]
@@ -138,7 +138,7 @@
(with-gensyms [g!stream]
(let [body+ (` (let [(~+ (List/join (List/map (function (_ pattern)
(list (` [(~ pattern) (~ g!stream)])
- (` ((~! cont.run) (~ g!stream)))))
+ (` ((~! continuation.run) (~ g!stream)))))
patterns)))]
(~ body)))]
(wrap (list& g!stream body+ branches)))))