begin Brent Yorgey quotation:
On Sun, May 30, 2010 at 11:15:40AM -0700, Mike Dillon wrote:
begin Michael Snoyman quotation:
http://hackage.haskell.org/packages/archive/base/4.2.0.1/doc/html/Control-Monad.html#v%3AliftM2
I stumbled across this monadic combinator:
mcombine :: Monad m = (a - a - a) - m a - m a - m a
mcombine f mx my = do
x - mx
y - my
return (f x y)
I used it to chain the outputs of two Parsec String parsers together
using this operator:
(++) :: Monad m = m String - m String - m
On Sun, May 30, 2010 at 11:35 AM, Michael Vanier mvanie...@gmail.comwrote:
I stumbled across this monadic combinator:
mcombine :: Monad m = (a - a - a) - m a - m a - m a
mcombine f mx my = do
x - mx
y - my
return (f x y)
I used it to chain the outputs of two Parsec String
On 5/30/10 1:40 AM, Michael Snoyman wrote:
On Sun, May 30, 2010 at 11:35 AM, Michael Vanier mvanie...@gmail.com
mailto:mvanie...@gmail.com wrote:
I stumbled across this monadic combinator:
mcombine :: Monad m = (a - a - a) - m a - m a - m a
mcombine f mx my = do
x - mx
On Sun, May 30, 2010 at 1:35 AM, Michael Vanier mvanie...@gmail.com wrote:
I stumbled across this monadic combinator:
mcombine :: Monad m = (a - a - a) - m a - m a - m a
mcombine f mx my = do
x - mx
y - my
return (f x y)
I used it to chain the outputs of two Parsec String
It might be useful to relax the type of the function to
Monad m = (a - b - c) - m a - m b - m c
/Jonas
On 30 May 2010 10:35, Michael Vanier mvanie...@gmail.com wrote:
I stumbled across this monadic combinator:
mcombine :: Monad m = (a - a - a) - m a - m a - m a
mcombine f mx my = do
x -
begin Michael Snoyman quotation:
http://hackage.haskell.org/packages/archive/base/4.2.0.1/doc/html/Control-Monad.html#v%3AliftM2
file:///usr/share/doc/ghc6-doc/html/libraries/base-4.2.0.0/Control-Monad.html#v%3AliftM2Strangely,
Hayoo didn't turn this one up... anyone know why?
Hoogle finds
On Sun, May 30, 2010 at 8:15 PM, Mike Dillon m...@embody.org wrote:
That second search also shows zipWith in there; I never really thought
about zipWith being like liftM2 for the list Monad. I don't believe
that's actually true for the normal list Monad, but it should be true of
an alternate
On Sun, May 30, 2010 at 11:15:40AM -0700, Mike Dillon wrote:
begin Michael Snoyman quotation:
http://hackage.haskell.org/packages/archive/base/4.2.0.1/doc/html/Control-Monad.html#v%3AliftM2
file:///usr/share/doc/ghc6-doc/html/libraries/base-4.2.0.0/Control-Monad.html#v%3AliftM2Strangely,