Identity -is:module

Identity functor and monad. (a non-strict monad)

Examples

>>> fmap (+1) (Identity 0)
Identity 1
>>> Identity [1, 2, 3] <> Identity [4, 5, 6]
Identity [1,2,3,4,5,6]
>>> do
x <- Identity 10
y <- Identity (x + 5)
pure (x + y)
Identity 25
Identity functor and monad. (a non-strict monad)
Identity functor and monad. (a non-strict monad)
This is identical to the Identity from Data.Functor.Identity in "base" except for its Show instance.
Identity functor and monad. (a non-strict monad)
Identity functor and monad. (a non-strict monad)
Each inhabitant is either a knave or a knight
The identiy projection. This can be combined with PrReflectX and PrReflectY in the list of projection properties.
Equivalent of Identity for rank 2 data types
identity
Represents a valid 10-digit ROC national identification number (中華民國身份證號碼) of the form A123456789. By construction, invalid values are not representable by this type. An identification number encodes a person's Gender, the Location in which they first registered for an identification card, and a unique Serial number.
The identity matrix for any dimension vector.
>>> identity :: M44 Int
V4 (V4 1 0 0 0) (V4 0 1 0 0) (V4 0 0 1 0) (V4 0 0 0 1)

>>> identity :: V3 (V3 Int)
V3 (V3 1 0 0) (V3 0 1 0) (V3 0 0 1)
The identity function, returns the give value unchanged.
Renamed version of id.
>>> identity 10
10
>>> fmap identity [1,2,3]
[1,2,3]