arliss_obsidian/fp/Classes/Functor/Applicative.md
Orion Kindel d74fc46755
update
2024-09-24 14:53:59 -05:00

445 B

Adds the pure Functions to Apply, allowing arbitrary values to be wrapped in a Functor.

class Apply f <= Applicative f where
  pure :: forall a. a -> f a

Examples

pure a in various types:

type equivalent to
Array [a]
List Cons a
Maybe Just a
Either Right a
Effect () => amore or less
Aff Promise.resolve(a)more or less