Skip to content

Instantly share code, notes, and snippets.

@runarorama
Created September 17, 2015 17:18
Show Gist options
  • Save runarorama/c9d1360218e927251d04 to your computer and use it in GitHub Desktop.
Save runarorama/c9d1360218e927251d04 to your computer and use it in GitHub Desktop.
Forgetful/Cofree adjunction
leftAdjunct :: (Comonad f) => (forall b. f b -> g b) -> f a -> Cofree g a
leftAdjunct f z = extract z :< f (z =>> leftAdjunct f)
rightAdjunct :: (forall b. f a -> Cofree g a) -> f b -> g b
rightAdjunct = _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment