diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/collection/sequence.lux | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/source/lux/data/collection/sequence.lux b/stdlib/source/lux/data/collection/sequence.lux index 2f9cf3722..6529a1ced 100644 --- a/stdlib/source/lux/data/collection/sequence.lux +++ b/stdlib/source/lux/data/collection/sequence.lux @@ -62,7 +62,7 @@ (def: #export (nth idx s) (All [a] (-> Nat (Sequence a) a)) (let [[h t] (continuation.run s)] - (if (n/> +0 idx) + (if (n/> 0 idx) (nth (dec idx) t) h))) @@ -93,7 +93,7 @@ [(list) xs])))] [take-while drop-while split-while (-> a Bit) (pred x) pred] - [take drop split Nat (n/> +0 pred) (dec pred)] + [take drop split Nat (n/> 0 pred) (dec pred)] ) (def: #export (unfold step init) @@ -138,7 +138,7 @@ {branches (p.some s.any)}) {#.doc (doc "Allows destructuring of sequences in pattern-matching expressions." "Caveat emptor: Only use it for destructuring, and not for testing values within the sequences." - (let [(^sequence& x y z _tail) (some-sequence-func 1 2 3)] + (let [(^sequence& x y z _tail) (some-sequence-func +1 +2 +3)] (func x y z)))} (with-gensyms [g!sequence] (let [body+ (` (let [(~+ (list/join (list/map (function (_ pattern) |