# Identity
An Identity is a wrapper for a value that cannot be changed. It is useful for handling pure values.
**Implements:** [Monad](https://github.com/fantasyland/fantasy-land#monad), [Semigroup](https://github.com/fantasyland/fantasy-land#semigroup), [Setoid](https://github.com/fantasyland/fantasy-land#setoid)
- [Identity](#identity)
- [Identity(v)](#identityv)
- [Identity.of(v)](#identityofv)
- [Identity.equals(j)](#identityequalsj)
- [Identity.concat(p)](#identityconcatp)
- [Identity.getValue()](#identitygetvalue)
- [Identity.map(f)](#identitymapf)
- [Identity.chain(f)](#identitychainf)
- [Identity.toString()](#identitytostring)
- [Examples](#examples)
### Identity(v)
The Identity constructor.
| Param | Type | Description |
| ----- | ---------------- | ---------------------------------------------------------------- |
| v | any | The value to be wrapped by Identity. This cannot be `undefined`. |
### Identity.of(v)
Identity constructor.
| Param | Type | Description |
| ----- | ---------------- | ---------------------------------------------------------------- |
| v | any | The value to be wrapped by Identity. This cannot be `undefined`. |
### Identity.equals(j)
Checks if the value of the current Identity is equal to the value of the passed Identity. This uses strict equality (`===`) to compare the values of the two Identities.
| Param | Type | Description |
| ----- | ---------------------------------- | ---------------------------- |
| j | [Identity](#identity) | The Identity to compare with |
### Identity.concat(p)
Concatenates the current Identity with the passed one. Note that the values of both Identities must be of the same type and must be of a type that supports the `Semigroup` concatenation operation for this to work.
| Param | Type | Description |
| ----- | ---------------------------------- | -------------------------------- |
| p | [Identity](#identity) | The Identity to concatenate with |
### Identity.getValue()
Gets the value within the Identity.
### Identity.map(f)
Applies the function to the value of the current Identity.
| Param | Type | Description |
| ----- | --------------------- | ----------- |
| f | function | Function |
### Identity.chain(f)
Chains a computation that returns an Identity.
| Param | Type | Description |
| ----- | --------------------- | -------------------------------------- |
| f | function | Function that returns another Identity |
### Identity.toString()
Returns a stringified version of the Identity.
---
### Examples
**TODO: Add some examples**