of

Constructs an applicative containing the given value.

This feature is experimental!

This API is still experimental, so it may change or be removed in future versions. You should not rely on it for production applications.

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.

Experimental
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
experimental
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/)