Visitor
Implements the
Visitor Pattern
for interpreting the Iterant
data structure.
Implements the
Visitor Pattern
for interpreting the Iterant
data structure.
This can be used as an alternative to pattern matching and is
used in the implementation of Iterant
for performance reasons.
WARN: this being a class instead of a recursive function, it means that it often has to keep "shared state". Keeping shared state is great for performance, but breaks referential transparency, so use with care.