fantasy-land VS language-ext

Compare fantasy-land vs language-ext and see what are their differences.

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
fantasy-land language-ext
21 41
9,997 6,176
0.2% -
3.1 6.9
4 months ago 12 days ago
JavaScript C#
MIT License MIT License
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.
  • 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.
  • Ruby in FantasyLand: SumsUp
    3 projects | dev.to | 23 May 2022
    Javascript comes with this lovely little spec called Fantasy Land that defines certain type classes in Category Theory and how they interact.

language-ext

Posts with mentions or reviews of language-ext. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-27.
  • The Monad Invasion - Part 2: Monads in Action!
    3 projects | dev.to | 27 Feb 2024
    You probably noticed that .SetName() returns a Either. You may have come across Unit in libraries like MediatR or Language-Ext. It's a simple construct representing a type with only one possible value. We use it as a placeholder for operations that do not return a value but may return another state. In our example, .SetName() is a Command that does not return a value but may fail. Therefore, the monad Either carries two possible states: Right (without value) or Left (with an Error).
  • The Monad Invasion - Part 1: What's a Monad?
    4 projects | dev.to | 27 Feb 2024
    Language-Ext is my personal favourite, but it can be a bit overwhelming for beginners due to its extensive feature set
  • Why don't you just use F#?
    1 project | news.ycombinator.com | 18 Sep 2023
  • The combined power of F# and C#
    10 projects | news.ycombinator.com | 7 Aug 2023
    > but I just want something closer to Scala, but for .Net

    That's what I'm working toward with my language-ext library [1]. Obviously more support for expression based programming would be welcome (and higher kinds), but you can do a lot with LINQ and a good integrated library surface.

    [1] https://github.com/louthy/language-ext

  • Option<T> monad for Unity/UniTask
    2 projects | /r/Unity3D | 10 Jul 2023
    Definitely a fan of option types, I wonder this library has anything over the C# library language-ext which also has an Option type?
  • Result pattern: language-ext vs FunctionalExtensions?
    2 projects | /r/dotnet | 7 Jul 2023
    Hey, I am considering adopting the Result pattern in my codebase. Wanted to get some opinions from someone who has experience with it: should I start with language-ext or FunctionalExtensions?
  • John Carmack on Functional Programming in C++ (2018)
    7 projects | news.ycombinator.com | 18 Feb 2023
    > [1] https://github.com/louthy/language-ext

    Cool library. I've had a few of these patterns in my Sasa library for years, but you've taken it to the Haskell extreme! Probably further than most C# developers could stomach. ;-)

    You might be interested in checking out the hash array mapped trie from Sasa [1]. It cleverly exploits the CLR's reified generics to unbox the trie at various levels which ends up saving quite a bit of space and indirections, so it performs almost on par with the mutable dictionary.

    I had an earlier version that used an outer struct to ensure it's never null, similar to how your collections seem to work, but switched to classes to make it more idiomatic in C#.

    I recently started sketching out a Haskell-like generic "Deriving" source generator, contrasted with your domain-specific piecemeal approach, ie. [Record], [Reader], etc. Did you ever try that approach?

    [1] https://sourceforge.net/p/sasa/code/ci/default/tree/Sasa.Col...

    [2] https://sourceforge.net/p/sasa/code/ci/57417faec5ed442224a0f...

  • Don't sleep on Linq query syntax if you regularly iterate through large/complex data sources
    1 project | /r/csharp | 16 Feb 2023
    languageext supports linq for its monads and I kinda love it. The challenge is convincing my colleagues. 😅
  • What C# feature blew your mind when you learned it?
    4 projects | /r/csharp | 7 Feb 2023
    language-ext supports it and it's pretty dang cool.
  • It's actually not that bad...
    1 project | /r/ProgrammerHumor | 14 Jan 2023
    I can only recommend c# language extensions library https://github.com/louthy/language-ext

What are some alternatives?

When comparing fantasy-land and language-ext you can also consider the following projects:

worldle

OneOf - Easy to use F#-like ~discriminated~ unions for C# with exhaustive compile time matching

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

CSharpFunctionalExtensions - Functional extensions for C#

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

Optional - A robust option type for C#

ramda - :ram: Practical functional Javascript

MoreLINQ - Extensions to LINQ to Objects

newtype-ts - Implementation of newtypes in TypeScript

Curryfy - Provides strongly typed extensions methods for C# delegates to take advantages of functional programming techniques, like currying and partial application.

Exercism - website - The codebase for Exercism's website.

VisualFSharp - The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio