# fantasyland/fantasy-land

Specification for interoperability of common algebraic structures in JavaScript

Repository: https://github.com/fantasyland/fantasy-land
Canonical: https://ross.abutalabs.com/products/fantasy-land
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, fantasy-land, functional, specification
Last push: 2024-11-10T21:50:53+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4891, "days_push": 661, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10240, forks 369 (observed 2026-08-28T04:10:41.194274+00:00)

## What it is
Fantasy Land is a specification (not a runtime library) defining how common algebraic structures like functors, monads, monoids, and semigroups should interoperate in JavaScript. It provides laws and method contracts that functional programming libraries can implement for compatibility.

## Use cases
- make my JavaScript library's data types interoperable with other functional libraries
- understand what laws a monad or functor must satisfy in JavaScript
- implement algebraic data types that work across fp libraries
- find the standard method names for chain, ap, map, concat in JS
- check whether my functional library complies with a known spec
- learn functional programming concepts like semigroup and traversable

## When to choose
- you are building a JavaScript functional programming library and want interoperability with the ecosystem
- you need a canonical reference for algebraic structure laws and method contracts
- you want to verify or test that your types follow functor/monad laws

## When to avoid
- you want a runtime library with working implementations of monads or functors - use libraries like Sanctuary, fp-ts, or Ramda instead
- you are not doing functional programming in JavaScript
- you need executable code rather than a specification

## Facets
- artifact type: learning-resource
- maturity: stable
- function: serialization, developer-tools
- domain: programming-languages, developer-tools
- platform: cross-platform
- tags: functional-programming, algebraic-structures, specification, functor, monad, monoid, typeclasses, interoperability, algorithms, nodejs, javascript

## Member repositories
- fantasyland/fantasy-land (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:41.194274+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:19:28.526148+00:00, confidence not recorded.
  - readme: https://github.com/fantasyland/fantasy-land (fetched 2026-08-28T04:10:41.194274+00:00, sha 037727f2de35)
  - registry_npm: https://registry.npmjs.org/fantasy-land (fetched 2026-08-29T08:19:14.440705+00:00, sha 7d3b540add00)
- Data as of 2026-08-30T08:39:29.467469+00:00.
