JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

some

core-api


    function
    boot.janet on line 2247, column 1

    (some pred ind & inds)

    Returns nil if applying `pred` to every value in a data structure 
    `ind` results in only falsey values, but only if no `inds` are 
    provided. Multiple data structures can be handled if each `inds` is 
    a data structure and `pred` is a function of arity one more than 
    the number of `inds`. Returns the first truthy result encountered. 
    Note that `pred` is only called as many times as the length of the 
    shortest of `ind` and each of `inds`. If `ind` or any of `inds` are 
    empty, returns nil.


See also:allany?2 examplesSign in to add an example
Loading...
(some odd? [2 4 6 8 10])
# =>
nil
sogaiuPlayground
(some even? [1 3 5 7 11 18])
# =>
true
sogaiuPlayground