empty

Returns the identity object for a monoid.

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

empty(monoid)
forall M, a:
  (M) => M a
where M is Monoid

Documentation

Returns the identity object for a monoid.

Properties

Convenience

curried()

Returns the identity object for a monoid.

Experimental
infix()

Returns the identity object for a monoid.

Experimental

Source Code

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