Skip to content

Instantly share code, notes, and snippets.

@Lifelovinglight
Created October 21, 2017 11:17
Show Gist options
  • Save Lifelovinglight/02e2f75eefd577dc91615982cc5b67bf to your computer and use it in GitHub Desktop.
Save Lifelovinglight/02e2f75eefd577dc91615982cc5b67bf to your computer and use it in GitHub Desktop.
import Data.Monoid
import Control.Monad
import Control.Applicative
(<<>>) :: (Monad m, Monoid a) => m a -> m a -> m a
a <<>> b = (<>) <$> a <*> b
(<<>) :: (Monad m, Monoid a) => m a -> a -> m a
a <<> b = (<>) <$> a <*> (return b)
(<>>) :: (Monad m, Monoid a) => a -> m a -> m a
a <>> b = (<>) <$> (return a) <*> b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment