JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

reduce2

core-api


    function
    boot.janet on line 1105, column 1

    (reduce2 f x)

    The 2-argument version of `reduce`. Instead of taking an explicit 
    initial value, the first value of `x` is used instead. If `x` is 
    empty, returns `nil`.

    `x` can be a bytes, indexed, dictionary, fiber, or abstract type 
    with suitable `get` and `next` methods.


See also:reduce0 examplesSign in to add an example
Loading...