diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/data/collection/sequence.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux index 8efb47cce..72821bf95 100644 --- a/stdlib/source/library/lux/data/collection/sequence.lux +++ b/stdlib/source/library/lux/data/collection/sequence.lux @@ -23,18 +23,18 @@ (Cont [a (Sequence a)])) (def: .public (iterations step init) - (All [a b] + (All (_ a b) (-> (-> a [a b]) a (Sequence b))) (let [[next x] (step init)] (//.pending [x (iterations step next)]))) (def: .public (repeated x) - (All [a] + (All (_ a) (-> a (Sequence a))) (//.pending [x (repeated x)])) (def: .public (cycle [start next]) - (All [a] + (All (_ a) (-> [a (List a)] (Sequence a))) (loop [head start tail next] @@ -47,7 +47,7 @@ (template [<name> <return>] [(def: .public (<name> sequence) - (All [a] (-> (Sequence a) <return>)) + (All (_ a) (-> (Sequence a) <return>)) (let [[head tail] (//.result sequence)] <name>))] @@ -56,7 +56,7 @@ ) (def: .public (item idx sequence) - (All [a] (-> Nat (Sequence a) a)) + (All (_ a) (-> Nat (Sequence a) a)) (let [[head tail] (//.result sequence)] (case idx 0 head @@ -64,7 +64,7 @@ (template [<taker> <dropper> <pred_type> <pred_test> <pred_step> <post_test>] [(def: .public (<taker> pred xs) - (All [a] + (All (_ a) (-> <pred_type> (Sequence a) (List a))) (let [[x xs'] (//.result xs)] (if (<post_test> <pred_test>) @@ -72,7 +72,7 @@ (list)))) (def: .public (<dropper> pred xs) - (All [a] + (All (_ a) (-> <pred_type> (Sequence a) (Sequence a))) (let [[x xs'] (//.result xs)] (if (<post_test> <pred_test>) @@ -85,7 +85,7 @@ (template [<splitter> <pred_type> <pred_test> <pred_step>] [(def: .public (<splitter> pred xs) - (All [a] + (All (_ a) (-> <pred_type> (Sequence a) [(List a) (Sequence a)])) (let [[x xs'] (//.result xs)] (if <pred_test> @@ -98,14 +98,14 @@ ) (def: .public (only predicate sequence) - (All [a] (-> (-> a Bit) (Sequence a) (Sequence a))) + (All (_ a) (-> (-> a Bit) (Sequence a) (Sequence a))) (let [[head tail] (//.result sequence)] (if (predicate head) (//.pending [head (only predicate tail)]) (only predicate tail)))) (def: .public (partition left? xs) - (All [a] (-> (-> a Bit) (Sequence a) [(Sequence a) (Sequence a)])) + (All (_ a) (-> (-> a Bit) (Sequence a) [(Sequence a) (Sequence a)])) [(..only left? xs) (..only (bit.complement left?) xs)]) |