JanetDocsPlaygroundI'm feeling luckyGitHub sign in

take-until



    function
    boot.janet on line 1044, column 1

    (take-until pred ind)

    Same as (take-while (complement pred) ind).


1 exampleSign in to add an example
Loading...
# uses the fn shorthand
(take-until |(< 3 $) [0 1 2 3 4 5 6 7 8])
# (0 1 2 3)

# uses partial
(take-until (partial < 3) [0 1 2 3 4 5 6 7 8])
# (0 1 2 3)
leobmPlayground