[Haskell-cafe] name for monad-like structure?
lrpalmer at gmail.com
Tue Apr 28 19:19:51 EDT 2009
On Tue, Apr 28, 2009 at 4:54 PM, Michael Vanier <mvanier42 at gmail.com> wrote:
> I've stumbled upon a structure that is like a weaker version of a monad,
> one that supports return and >> but not >>=. Has anyone seen this before,
> and if so, does it have a standard name?
That is a strange structure. The type parameter is hardly doing anything:
whenever you compose two of them together, you have no choice but to ignore
the left one.
Let's call your structure S. It's likely that S a is isomorphic to a pair
(m, a), where m is some monoid.
I would see if you can restate your problem in terms of a monoid.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe