function
boot.janet on line 1131, column 1
(take-while pred ind)
Given a predicate, take only elements from a fiber, indexed, or
bytes type that satisfy the predicate, and abort on first failure.
Returns a new array, tuple, or string, respectively.
(take-while number?
(fiber/new
|(each x [1 2 3 :hi]
(yield x))))
# => @[1 2 3]
(take-while number? @[1 2 3 "4" 5 6 7 8 9 "10" 11 "12"]) # => (1 2 3)