Skip to content

Instantly share code, notes, and snippets.

@WillNess
Last active December 14, 2015 02:39
Show Gist options
  • Save WillNess/5015797 to your computer and use it in GitHub Desktop.
Save WillNess/5015797 to your computer and use it in GitHub Desktop.
fmap :: (a->b) -> foo a -> foo b (a->b) -> (p->a) -> (p->b)
fmap :: (c->d) -> bar c -> bar d (c->d) -> (q->c) -> (q->d)
(.) :: (t->u) -> (s->t) -> (s->u)
(.) fmap :: -- t ~ (a->b) ; u ~ (foo a->foo b)
(s->a->b) -> (s->foo a->foo b) (s->a->b) -> (s->(p->a)->(p->b))
(.) fmap fmap :: s ~ (c->d) ; a ~ (bar c) b ~ (bar d)
( (c->d) -> foo(bar c) -> foo(bar d) )
LET foo :: ((->) p) ; bar :: ((->) q) THEN
(fmap . fmap) :: (c->d) -> (p->q->c) -> (p->q->d)
(fmap . fmap) f g p q = f (g p q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment