
On Fri, Jan 10, 2014 at 5:12 AM, Vlatko Basic
However, what I was trying to find out were the reasons for the way it is *implemented*. When I look at the code for Maybe and Either, it seems to me like the violation of the "do not repeat yourself" principle. That principle is taken rather seriously in Haskell. Even HLint has "Reduce duplication" suggestion. *Some* of the code I looked at appears the same.
Less so than you'd think, or there wouldn't be so much resistance to (for example) replacing list-specific stuff in Prelude with the more general Foldable/Traversable ones. The pressure for simple and easy to understand stuff (like Maybe vs. Either () or whatever) turns out to be stronger. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net