diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/data/collection/sequence.lux | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index b21741752..b97e1f7d2 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -39,8 +39,8 @@ index (\ ! map (n.% 100) random.nat) size (\ ! map (|>> (n.% 10) inc) random.nat) offset (\ ! map (n.% 100) random.nat) - cycle-start random.nat - cycle-next (random.list size random.nat)] + cycle_start random.nat + cycle_next (random.list size random.nat)] ($_ _.and (_.for [/.functor] ($functor.spec /.repeat ..equivalence /.functor)) @@ -65,19 +65,19 @@ drops) (list\= (enum.range n.enum size (dec (n.* 2 size))) (/.take size takes))))) - (_.cover [/.take-while] + (_.cover [/.take_while] (list\= (enum.range n.enum 0 (dec size)) - (/.take-while (n.< size) (/.iterate inc 0)))) - (_.cover [/.drop-while] + (/.take_while (n.< size) (/.iterate inc 0)))) + (_.cover [/.drop_while] (list\= (enum.range n.enum offset (dec (n.+ size offset))) - (/.take-while (n.< (n.+ size offset)) - (/.drop-while (n.< offset) (/.iterate inc 0))))) - (_.cover [/.split-while] - (let [[drops takes] (/.split-while (n.< size) (/.iterate inc 0))] + (/.take_while (n.< (n.+ size offset)) + (/.drop_while (n.< offset) (/.iterate inc 0))))) + (_.cover [/.split_while] + (let [[drops takes] (/.split_while (n.< size) (/.iterate inc 0))] (and (list\= (enum.range n.enum 0 (dec size)) drops) (list\= (enum.range n.enum size (dec (n.* 2 size))) - (/.take-while (n.< (n.* 2 size)) takes))))) + (/.take_while (n.< (n.* 2 size)) takes))))) (_.cover [/.head] (n.= offset (/.head (/.iterate inc offset)))) @@ -102,10 +102,10 @@ (/.unfold (function (_ n) [(inc n) (%.nat n)]) offset))))) (_.cover [/.cycle] - (let [cycle (list& cycle-start cycle-next)] + (let [cycle (list& cycle_start cycle_next)] (list\= (list.concat (list.repeat size cycle)) (/.take (n.* size (list.size cycle)) - (/.cycle [cycle-start cycle-next]))))) + (/.cycle [cycle_start cycle_next]))))) (_.cover [/.^sequence&] (let [(/.^sequence& first second third next) (/.iterate inc offset)] (and (n.= offset first) |