Laws and partial values (was: [Haskell-cafe] mapM_ ->

roconnor at roconnor at
Fri Jan 23 20:10:38 EST 2009

On Fri, 23 Jan 2009, Derek Elkins wrote:

> mempty `mappend` undefined = undefined (left identity monoid law)
> The above definition doesn't meet this, similarly for the right identity
> monoid law.  That only leaves one definition, () `mappend` () = () which
> does indeed satisfy the monoid laws.
> So the answer to the question is "Yes."  Another example of making
> things as lazy as possible going astray.

I'd like to argue that laws, such as monoid laws, do not apply to partial 
values.  But I haven't thought my position through yet.

Russell O'Connor                                      <>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''

More information about the Haskell-Cafe mailing list