News for hackers. Stuff that matters.
Re:Infinite work is less work by moomin on Thursday July 11, 2019 @01:20PM (#20413421)
Indeed. Reduce is a catamorphism, but not all catamorphisms are reduce. On the other hand, it's generally underappreciated how useful unfold (ana) and refold (hylo) are, even if we're just talking about lists.
Re:Infinite work is less work by dhash on Thursday July 11, 2019 @02:06PM (#20413858)
Recursion schemes are the FP way of doing the Visitor Pattern. You can get annotations with (coelgot, zygo) which are super useful for tupecheckers, allow the fold to accumulate effects (gana, gcata), or even look into the future of the recursion (futu).

They do get a bit much at times though, since you can compose them easily. Zygohistoprepromorphisms are one example of this.