Skip to content

Instantly share code, notes, and snippets.

@shmish111
Last active August 13, 2019 22:17
Show Gist options
  • Save shmish111/0172215916669ae9f5ef822ffcc7c429 to your computer and use it in GitHub Desktop.
Save shmish111/0172215916669ae9f5ef822ffcc7c429 to your computer and use it in GitHub Desktop.
module D
func1 : Applicative f => (a -> f c) -> (b -> f d) -> (a, b) -> f (c, d)
func1 f g (a, b) = MkPair <$> f a <*> g b
func2 : (a -> c) -> (b -> d) -> a -> b -> (c, d)
func2 f g a b = MkPair (f a) (g b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment