#readwise # The Identity functor ![rw-book-cover](https://blog.ploeh.dk/assets/themes/ploeh/images/favicons/favicon.png) ## Metadata - Author: [[Mark Seemann]] - Full Title: The Identity functor - URL: https://blog.ploeh.dk/2018/09/03/the-identity-functor/ ## Notes The identity functor also forms a monad. See [[The Identity Monad]]. ## Highlights - The Identity functor is a data container that doesn't do anything. It's a functor nonetheless. ([View Highlight](https://read.readwise.io/read/01gwrk3cmcv2qek2v2gqc7yth1)) - The inutility of Identity doesn't mean that it doesn't exist. The Identity functor exists, whether it's useful or not. You can ignore it, but it still exists. In C# or [F#](https://fsharp.org) I've never had any use for it (although I've [described it before](https://blog.ploeh.dk/2017/09/04/builder-as-identity)), while it turns out to be occasionally useful in [Haskell](https://www.haskell.org), where it's built-in ([View Highlight](https://read.readwise.io/read/01gwrk4mz26w4mtxqxxe4j7y5c)) - The Identity functor exists, and you can implement it in C# and F#, although I don't see any use for it. Haskell has a type system that can express abstractions such as `Functor` in the type system itself. In that language, then, you can define functions that return any type of functor (e.g. `Maybe`, `Tree`, and so on). If you need a plain vanilla version of such a function, you can make it return `Identity`. ([View Highlight](https://read.readwise.io/read/01gwrk6wkc66g4tktth5xbkvx1))