std.identity

Types

type Identity a = a

Values

let functor : std.functor.Functor std.identity.Identity

A Functor represents an action on a parameterized type which does not change the structure with the mapped type.

The following laws should hold:

  • map id == id
  • map (f << g) == map f << map g

let applicative : std.applicative.Applicative std.identity.Identity

A Functor with application.

The following laws should hold:

  • wrap id <*> v = v
  • wrap (<<) <> u <> v <> w = u <> (v <*> w)
  • wrap f <*> wrap x = wrap (f x)
  • u <> wrap y = wrap (\g -> g x) <> u

let monad : std.monad.Monad std.identity.Identity

A generalised interface for imperatively sequencing actions