#readwise
# The Identity Monad

## Metadata
- Author: [[Mark Seemann]]
- Full Title: The Identity Monad
- URL: https://blog.ploeh.dk/2022/05/16/the-identity-monad/
## Highlights
- [[The Identity functor]] is another example of a functor that also forms a monad. Contrary to useful monads like [list](https://blog.ploeh.dk/2022/04/19/the-list-monad), [Maybe](https://blog.ploeh.dk/2022/04/25/the-maybe-monad), and [Either](https://blog.ploeh.dk/2022/05/09/an-either-monad), the Identity monad isn't particularly useful. In [Haskell](https://www.haskell.org) it serves a few niche positions, for example when it comes to monad transformers. It's possible to define abstractions at a higher level in Haskell than it is in many other languages. Some of those abstractions involve monads. The Identity monad can plug into these abstractions as a 'do-nothing' monad, a bit like the [Null Object pattern](https://en.wikipedia.org/wiki/Null_object_pattern) can supply a 'do-nothing' implementation of an interface.
Other languages with which I'm proficient (C#, [F#](https://fsharp.org)) don't enable that kind of abstraction, and I've never felt the need to actually *use* the Identity monad in those languages. Still, the Identity monad exists mathematically and conceptually, and it can be useful to know of that existence. ([View Highlight](https://read.readwise.io/read/01gwrka6k1sq0c5yjx8csg64xa))
- If the Identity monad is useful in languages like C# and F#, I have yet to encounter a use case. Even so, it exists. It is also, perhaps, the most naked illustration of what a functor and monad is. As such, I think it may be helpful to study. ([View Highlight](https://read.readwise.io/read/01gwrkbk6jzzgs47c6ah0ssp18))