the structure is the fold
the fold is the structure
Conversation
nobody taking the bait...
it has to do with initial/final encodings of data structures.
1
i don't know much CT and i wish there were ways to not use that language...
the pattern is very useful tho.
basic idea is that a data structure, and the function processing that data structure are in some sense the same thing (dual meaning opposite, but same structure).
Replying to
practically this means that in many cases where you think "i need a data structure", you probably just want the corresponding iteration pattern.
this is the most important organizing principle i learned from functional programming, directly applicable to low level code work.
1
i find it very hard to articulate
i don't think it is just "this one trick i like".
