patterns icon indicating copy to clipboard operation
patterns copied to clipboard

Fold pattern discussion should mention Iterator::scan

Open NilSet opened this issue 4 years ago • 0 comments

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.

NilSet avatar Jan 03 '21 12:01 NilSet