Skip to content

Instantly share code, notes, and snippets.

@mandubian
Last active November 12, 2017 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mandubian/5da2c028cc3b9692920a0d4680ff189a to your computer and use it in GitHub Desktop.
Save mandubian/5da2c028cc3b9692920a0d4680ff189a to your computer and use it in GitHub Desktop.
// simple identity function
def f: A => A = identity
// if I have an implicit Cat[=>] in my scope
val K = implicitly[Cat[Function1]]
// I can rewrite f into the language of categories
def f = K.id[A]
// Both are equivalent by the CHL isomorphism...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment