The-Inevitable-Event-Centric-Book icon indicating copy to clipboard operation
The-Inevitable-Event-Centric-Book copied to clipboard

Problem: Define the word Fold

Open ylorph opened this issue 4 years ago • 3 comments

ylorph avatar Sep 06 '19 12:09 ylorph

Does this have an event-centric meaning other than the functional programming meaning of fold?

MerrionComputing avatar Oct 31 '19 12:10 MerrionComputing

I'm referring to what greg says => state is a left fold of the events list

ylorph avatar Oct 31 '19 12:10 ylorph

It happens to map very much to the intrinsic FP meaning; for me that implies:

  • building a state (generally without context)
  • from an initial state
  • logically from individual events

Example of a fold function - pretty much all FP langs have a fold (it's called Aggregate in LINQ)

bartelink avatar Oct 31 '19 15:10 bartelink