Re:The visitor pattern is essentially the same thing as Chur...
by dwohnitmok on Saturday February 06, 2021 @05:02PM
(#26050419)
There wouldn't be a subtype of Addition because Haskell doesn't have a notion of subtyping in the same way C# does. It would depend on the particulars of what the difference between SmallNumberAddition and Addition look like (in particular which parts are kept with the same functionality and which are different). The answer could be either a simple function or a typeclass depending on that.
[ Parent
| on HN ]
There are no comments on this comment yet.