This project specifies interoperability of common algebraic structures like Setoid, Ord, Semigroupoid, Category, Semigroup, Monoid, Group, Filterable, Functor, Contravariant, Apply, Applicative, etc. An algebra is a set of values, a set of operators that it is closed under and some laws it must obey. Each Fantasy Land algebra is a separate specification. An algebra may have dependencies on other algebras which must be implemented. "Value" is any JavaScript value, including any which have the structures defined below. "Equivalent" is an appropriate definition of equivalence for the given value. The definition should ensure that the two values can be safely swapped out in a program that respects abstractions. For example, two lists are equivalent if they are equivalent at all indices, two plain old JavaScript objects, interpreted as dictionaries, are equivalent when they are equivalent for all keys, two promises are equivalent when they yield equivalent values, etc.

Features

  • Each Fantasy Land algebra is a separate specification
  • Certain behaviours are defined from the perspective of a member of a type
  • Other behaviours do not require a member
  • Certain algebras require a type to provide a value-level representative
  • If a data type provides a method which could be derived, its behaviour must be equivalent to that of the derivation
  • It is recommended to throw an exception on unspecified behaviour

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Fantasy Land Specification

Fantasy Land Specification Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Fantasy Land Specification!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Mathematics Software, JavaScript Libraries

Registered

2021-06-29