View Source Bindable.Pure protocol (Bindable v1.1.0)

"Type class" to create a computation that has no effect other than to produce a value.

Required to enable for-comprehension for your type.

Inspired by Applicative's pure.

Link to this section Summary

Types

t()

All the types that implement this protocol.

Functions

Create a computation that has no effect other than to produce a value.

Link to this section Types

@type t() :: term()

All the types that implement this protocol.

Link to this section Functions

@spec of(example :: m(a), a) :: pure_value :: m(a) when a: var

Create a computation that has no effect other than to produce a value.

Returns a "pure"-value of the type provided by example.