data OneOrNone a = None | One a deriving (Show) s (One o) = "got one! " ++ show o s None = "don't got one" main = do print (s (One 7)) print (s (One "hello")) print (s (None :: OneOrNone ()))
Zing!
The Visitor Design Pattern is useful for alleviating deficiencies of inexpressive programming languages lacking Algebraic Data Types or it is of no consequence and undeserving of recognition since it reduces to a fundamental tenet of computational theory.