1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Join over Bifunctors is a Functor.

This commit is contained in:
Rob Rix 2016-03-14 19:49:53 -04:00
parent b6f2385ead
commit 3620b79f54

View File

@ -1,3 +1,6 @@
module Data.Bifunctor.Join where
newtype Join p a = { runJoin :: p a a }
instance Bifunctor p => Functor (Join p) where
fmap f = Join . bimap f f . runJoin