2 ms·
> This seems congruent to the object<>closure equivalence. Nevertheless the resulting code reads quite differently. To write functional code that looks a bit m
by eru 5y ago
> This seems congruent to the object<>closure equivalence. Nevertheless the resulting code reads quite differently.
To write functional code that looks a bit more like OOP, I guess you want 'open recursion'. Open recursion is what allows you to do the equivalent of overwriting methods in subclasses when doing FP.
See eg https://www.cs.ox.ac.uk/people/ralf.hinze/talks/Open.pdf https://www.cs.ox.ac.uk/people/ralf.hinze/talks/Open.pdf or https://journal.stuffwithstuff.com/2013/08/26/what-is-open-recursion/ https://journal.stuffwithstuff.com/2013/08/26/what-is-open-r...