4 ms·
Yes the visitor pattern is a valid encoding of algebraic datatypes. Very heavyweight (imagine if booleans were all encoded with the visitor pattern) but nonethe
by dwohnitmok 6y ago
Yes the visitor pattern is a valid encoding of algebraic datatypes. Very heavyweight (imagine if booleans were all encoded with the visitor pattern) but nonetheless valid.
https://blog.ploeh.dk/2018/06/25/visitor-as-a-sum-type/ https://blog.ploeh.dk/2018/06/25/visitor-as-a-sum-type/