Skip to content

Fold pattern discussion should mention Iterator::scan #149

Open
@NilSet

Description

@NilSet

In the Fold page, it mentions how similar it is to Iterator::map but is more flexible. It should also mention Iterator::scan which allows carrying state forward across iterations, solving the earlier nodes can affect the operation on later nodes use case. In fact, a folder as described might make a good state object to carry through a scan.

I wonder if this pattern could be renamed to Scanner or something, since as mentioned in #54 the name Fold is mixed up with other programming concepts right next door to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-patternArea: Content about PatternsC-enhancementCategory: Enhancements to contentC-needs discussionArea: Something that is not clear to everyone if it fixes something/adds valuable content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions