File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 260260 (mut _index 0)
261261 (mut _output [])
262262 (mut continue true)
263- (while continue
263+ (while (and (< _index (len _L)) continue)
264264 (if (_f (@ _L _index))
265265 {
266266 (set _output (append _output (@ _L _index)))
Original file line number Diff line number Diff line change 5151 (set tests (assert-eq (list:take a 1) [1] "take" tests))
5252 (set tests (assert-eq (list:take a 100) a "take" tests))
5353
54+ (set tests (assert-eq (list:takeWhile a (fun (c) (< c 0))) [] "takeWhile" tests))
55+ (set tests (assert-eq (list:takeWhile a (fun (c) (< c 2))) [1] "takeWhile" tests))
56+ (set tests (assert-eq (list:takeWhile a (fun (c) (< c 3))) [1 2] "takeWhile" tests))
57+ (set tests (assert-eq (list:takeWhile a (fun (c) (< c 5))) [1 2 3] "takeWhile" tests))
58+
5459 (set tests (assert-eq (list:unzip zipped) [[1 2 3 4] [5 6 7 8]] "unzip" tests))
5560 (set tests (assert-eq (list:unzip []) [[] []] "unzip" tests))
5661
You can’t perform that action at this time.
0 commit comments