Skip to content

Instantly share code, notes, and snippets.

@evaporei
Created September 13, 2019 19:44
Show Gist options
  • Select an option

  • Save evaporei/0b4c130d11fb9e03a3dc8c03c2c05d77 to your computer and use it in GitHub Desktop.

Select an option

Save evaporei/0b4c130d11fb9e03a3dc8c03c2c05d77 to your computer and use it in GitHub Desktop.
Category Theory - Identity
function identity<T>(t: T): T {
return t
}
// identity ∘ f == f
// f ∘ identity == f
//
// Ou seja, uma função `f` composta com a
// identidade sempre da o mesmo resultado,
// independente da ordem da aplicação
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment