#readwise
# Builder as Identity

## Metadata
- Author: [[Mark Seemann]]
- Full Title: Builder as Identity
- URL: https://blog.ploeh.dk/2017/09/04/builder-as-identity/
## Highlights
**For many trivial functors, it turns out that the Glasgow Haskell Compiler (GHC) can automatically implement `fmap`** with a language extension ([View Highlight](https://read.readwise.io/read/01hbk1qx189jcrdc8z5bhacdff))
---
**If the compiler can automatically make `Builder` a `Functor`, perhaps it doesn't add that much value.**
This particular `Builder` is equivalent to Haskell's built-in `Identity` functor. **`Identity` is a 'no-op' functor, if you will. While it's a functor, it doesn't 'do' anything. It's similar to the [Null Object](https://en.wikipedia.org/wiki/Null_Object_pattern) design pattern, in the sense that the only value it adds is that it enables you to turn any naked value into a functor.** This can occasionally be useful if you need to pass a functor to an API. ([View Highlight](https://read.readwise.io/read/01gwgxn74z1tn6g4yvwa19rzvk)) ^8lbpay
---
Neither F# nor C# comes with a built-in identity functor, but it'd be as [trivial to create them](https://blog.ploeh.dk/2018/09/03/the-identity-functor) ([View Highlight](https://read.readwise.io/read/01gwgy3sdsmsqpzn6mdxdwz3qb))
---