Skip to content

Consider simplifying fold #20

Description

@hannobraun

In addition to a list and an anonymous function,fold also accepts an initial value.

Example:

1 [ 2 3 ] [ + ] fold # evaluates to `6`

It would be simpler to drop the first argument:

[ 2 3 ] [ + ] fold # evaluates to `5`

If an initial value is needed, it can be easily added to the list:

[ 2 3 ] 1 prepend [ + ] fold # evaluates to `6`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions