JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

sum

core-api


    function
    boot.janet on line 780, column 1

    (sum x)

    Returns the sum of the values of `x`. If `x` is empty, returns 0.

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


1 exampleSign in to add an example
Loading...
(+ 1 2 3)      # => 6
(sum [1 2 3])  # => 6
cellularmitosisPlayground