of

Constructs an applicative containing the given value.

Signature

of(applicative, value)
forall F, a:
  (F, a) => F a
where F is Applicative

Documentation

Constructs an applicative containing the given value.

Properties

Convenience

curried()

Constructs an applicative containing the given value.

infix(value)

Constructs an applicative containing the given value.

Experimental

Source Code

Defined in source/fantasy-land/of.js at line 33, column 0
(applicative, value) =>
  isNew(applicative)     ?  applicative[flOf](value)
: isCtorNew(applicative) ?  applicative.constructor[flOf](value)
: isOld(applicative)     ?  warn(applicative.of(value))
: isCtorOld(applicative) ?  warn(applicative.constructor.of(value))
: /*otherwise*/             unsupported(applicative)
Stability
stable
Licence
MIT
Module
folktale/fantasy-land/of
Authors
Copyright
(c) 2013-2017 Quildreen Motta, and CONTRIBUTORS
Authors
  • @boris-marinov
  • Quildreen Motta
Maintainers
  • Quildreen Motta <queen@robotlolita.me> (http://robotlolita.me/)