
27 Dec
2012
27 Dec
'12
4:13 p.m.
On 12/27/2012 02:45 PM, Roman Cheplyaka wrote:
I don't think the analogy holds. First and Last are wrappers for Maybe by intention — they are needed because we can't have two different instances for Maybe (although both of them make sense).
In this case, however, Maybe is used artificially to "lift" numbers. Monoidal instance for Maybe corresponding to 'max' would look rather weird.
Finally, we have nice names for mempty of Maximum/Minimum but not of First/Last.
Roman Good point. Now I'm slightly in favor of Roman's approach. Count me as +0.2 for Roman's version.