JanetDocsI'm feeling luckyGitHub sign in

filter



    function
    boot.janet on line 936, column 1

    (filter pred ind)

    Given a predicate, take only elements from an array or tuple for
    which (pred element) is truthy. Returns a new array.


See also:keep1 exampleSign in to add an example
Loading...
(filter (fn [x] (> x 2)) [1 2 3 4 5])  # @[3 4 5]
btbytes