fantasy-land VS promises-spec

Compare fantasy-land vs promises-spec and see what are their differences.

fantasy-land

Specification for interoperability of common algebraic structures in JavaScript (by fantasyland)

promises-spec

An open standard for sound, interoperable JavaScript promises—by implementers, for implementers. (by promises-aplus)
SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.
surveyjs.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
fantasy-land promises-spec
22 27
10,202 1,838
0.2% 0.0%
0.8 0.0
8 months ago almost 2 years ago
JavaScript
MIT License Creative Commons Zero v1.0 Universal
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

fantasy-land

Posts with mentions or reviews of fantasy-land. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-16.
  • JavaScript's Missed Opportunity: Async/Await, Optional Chaining, and flatMap are the same thing
    1 project | dev.to | 19 Feb 2025
    (This was one of the purposes of the Fantasy Land specification, to define common interfaces for generalized operations that could benefit from language-syntax-support.)
  • Functional Programming 1
    3 projects | news.ycombinator.com | 16 Aug 2023
    2. https://github.com/fantasyland/fantasy-land (A bit heavy on jargon)

    Note there is a python version of Ramda available on pypi and there’s a lot of FP tidbits inside JAX:

    3. https://pypi.org/project/ramda/ (Worth making your own version if you want to learn, though)

    4. For nested data, JAX tree_util is epic: https://jax.readthedocs.io/en/latest/jax.tree_util.html and also their curry implementation is funny: https://github.com/google/jax/blob/4ac2bdc2b1d71ec0010412a32...

    Anyway don’t put FP on a pedestal, main thing is to focus on the core principles of avoiding external mutation and making helper functions. Doesn’t always work because some languages like Rust don’t have legit support for currying (afaik in 2023 August), but in those cases you can hack it with builder methods to an extent.

    Finally, if you want to understand the middle of the midwit meme, check out this wiki article and connect the free monoid to the Kleene star (0 or more copies of your pattern) and Kleene plus (1 or more copies of your pattern). Those are also in regex so it can help you remember the regex symbols. https://en.wikipedia.org/wiki/Free_monoid?wprov=sfti1

    The simplest example might be {0}^* in which case

    0: “” // because we use *

  • Ramda: A practical functional library for JavaScript programmers
    7 projects | news.ycombinator.com | 4 Aug 2023
    It was never really my jam, but I used to follow the up-and-coming fantasy-land specs with great interest. It just seemed like a sharp dedicated community of folks trying to figure out better fp & algebraic stuff. I'm not sure who trailed off - in general I feel like there's much less connection in tech world, that the tech twitter and every other ultra-active tech channel has somewhat decayed. https://github.com/fantasyland/fantasy-land

    Thanks for the links. I know I've seen @gcanti's name a thousand times already, but it's already quite murky to me what it was attached to. Something in this sphere.

  • How elaborate could/should a transducers combiner function be?
    2 projects | /r/functionalprogramming | 5 Jan 2023
    Look at the implementations of Fantasy Land. List-in-JS might do the trick.
  • General Functional Programming Resources
    3 projects | /r/functionalprogramming | 17 Dec 2022
  • Should I Move From PHP to Node/Express?
    13 projects | /r/node | 13 Oct 2022
    There are respective fantasy land and static land specs, with the law conformance checks.
  • I came across the "Fantasy Land Specification", it somewhat conflicts with my own simplistic understanding of monads and functors. Is this specification valid, and should I honor it?
    2 projects | /r/functionalprogramming | 11 Sep 2022
    While building a purely functional data structure library for personal fun and professional use, and while using other libraries, I found that the "Fantasy Land Specification" was mentioned from time to time. They use this hierarchy. Although I did read some about category theory (tried and failed to fully understand all the concepts), some of the terms used in the specification are unknown to me (like Chain, Apply). My question:
  • Best explanation of monads ive ever seen, from the practical developper’s point of view.
    3 projects | /r/programming | 8 Jul 2022
    No: neither of those examples are "properties of futures and of lists as such." "Async/Await" in particular is a special case of monadic behavior of a concurrency monad. This specifically (infamously) came up in the evolution of the Prommise spec in ECMAScript, which in turn led to the development of the Fantasy Land Spec and various implementations of it.
  • should i learn design patterns?
    1 project | /r/node | 7 Jul 2022
  • Design Patterns Book for functional programming?
    1 project | /r/functionalprogramming | 5 Jun 2022
    If you're programming in TypeScript you can checkout the fantasy land spec. It provides a spec for all the algebraic structures used in the JS world. You can learn what they are. You'll want to find alternative resources to learn what they are how they work. Fantasy land is just a spec not a guide.

promises-spec

Posts with mentions or reviews of promises-spec. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-01-19.
  • NodeJS Fundamentals: Promise
    1 project | dev.to | 21 Jun 2025
    A Promise represents the eventual completion (or failure) of an asynchronous operation and its resulting value. Technically, it’s an object conforming to the Promises/A+ specification. In Node.js, the built-in Promise constructor provides this functionality. Crucially, Promises are thenable – they have a then method that allows chaining asynchronous operations.
  • Building a Custom Promise Implementation from Scratch
    1 project | dev.to | 16 May 2025
    With careful attention given to potential pitfalls, performance disparities, and advanced debugging techniques, this guide should serve as a valuable resource for senior developers looking to master not just the Promise API, but the subtleties that come with custom implementations. For further reading, consult resources like the MDN Web Docs on Promises and the Promises/A+ Specification.
  • Haskell: A Great Procedural Language
    18 projects | news.ycombinator.com | 19 Jan 2025
    Not so much a representation of a side effect (after all List is a Monad as is addition on integers no side effects anywhere in sight) as the reification of a particular category.

    JavaScript's `Promise` is particularly interesting because it is a Monad over "all JS values which do not contain a method called `then` in their prototype chain" or as Dominic put it 12 years ago:

    > Indeed, I like the way @medikoo phrases it. There's, practically speaking, nothing wrong with being a monad on the category of non-thenables.

    https://github.com/promises-aplus/promises-spec/issues/101#i...

  • Create your own Promise in JavaScript
    1 project | dev.to | 24 Dec 2024
    The core Promises/A+ specification does not deal with how to create, fulfill, or reject promises. It's up to you. But the implementation you provide for the promise's construction has to be compatible with asynchronous APIs in JavaScript. Here is the first draft of our Promise class:
  • Concurrency and parallelism in PHP (part 1)
    5 projects | dev.to | 29 Jul 2024
    The method getAsync, as well as their similar postAsync, putAsync, deleteAsync and so on, return a Promise, which implements the Promises/A+ spec. You can chain their calls or wait for all of them concurrently, as we've done. Executing this script would result in something like:
  • Implement Promises/A+ from scratch
    2 projects | dev.to | 22 Mar 2024
    Today, I tried implementing Promises/A+ from scratch to test my coding skill. In the process, I’ve crafted this guide to share my insights and experiences with those who share a similar interest. Without further ado, let’s dive in.
  • Using XPath in 2023
    8 projects | news.ycombinator.com | 16 Jul 2023
    That made me chuckle.

    For those not familiar with the promise design controversy:

    http://brianmckenna.org/blog/category_theory_promisesaplus

    https://github.com/promises-aplus/constructor-spec/issues/24

    https://github.com/promises-aplus/promises-spec/issues/94

  • Why is JavaScript so hated?
    2 projects | /r/ProgrammingLanguages | 19 Jun 2023
    If you really want to go down the rabbit hole on this one, start here
  • What the imperative shell of an Functional Core/Imperative Shell language looks like
    5 projects | /r/ProgrammingLanguages | 7 May 2023
    Advantage 1, nesting, is the most important here, and it's often the most-overlooked advantage. Overlooking nesting is how Promises in Javascript got to be fundamentally broken.
  • [AskJS] Is JavaScript missing some built-in methods?
    13 projects | /r/javascript | 23 Feb 2023
    Have you read the infamous GitHub thread where people tried to fix this before it got finalized? It's quite a trip

What are some alternatives?

When comparing fantasy-land and promises-spec you can also consider the following projects:

worldle

algo.monads - Macros for defining monads, and definition of the most common monads

awesome-functional-programming - Yet another resource for collecting articles, videos etc. regarding functional programming

proposal-set-methods - Proposal for new Set methods in JS

awesome-functional-python - A curated list of awesome things related to functional programming in Python.

fontoxpath - A minimalistic XPath 3.1 implementation in pure JavaScript

SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.
surveyjs.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured