3 ms·
From a functional perspective, aren’t visitors just a case of ‘map’ with potential side effects? That handles composition, streaming, and so on
by mattbierner 8y ago
From a functional perspective, aren’t visitors just a case of ‘map’ with potential side effects? That handles composition, streaming, and so on
- KirinDave 8y agoYes, but from a functional perspective you need to do extra work to make generalized recursive applications possible. If you're interested, the name is "Recursion Schemes". Avoid the paper, its notation is too challenging. This blog has a long running series which is much better: http://blog.sumtypeofway.com/an-introduction-to-recursion-schemes/ http://blog.sumtypeofway.com/an-introduction-to-recursion-sc...