Displaying 1 to 20 from 30 results

list - 🐆 An immutable list with unmatched performance and a comprehensive functional API.

  •    TypeScript

A fast immutable list with a functional API. List is a purely functional alternative to arrays. It is an implementation of a fast persistent sequence data structure. Compared to JavaScript's Array List has three major benefits.

fantasy-land - Specification for interoperability of common algebraic structures in JavaScript

  •    Javascript

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.

static-land - Specification for common algebraic structures in JavaScript based on Fantasy Land

  •    Javascript

This is a specification for common algebraic structures in JavaScript based on Fantasy Land.Fantasy Land uses methods to define interfaces that a type must implement in order to support a particular Algebra. For example values of a type that implements the Monoid algebra must have fantasy-land/empty and fantasy-land/concat methods on them.




flow-static-land - Implementation of common algebraic types in JavaScript + Flow

  •    Javascript

The idea (faking higher kinded types in Flow) is based on the paper Lightweight higher-kinded polymorphism and elm-brands.

data.task - Migrating to https://github.com/origamitower/folktale

  •    Javascript

The Task(a, b) structure represents values that depend on time. This allows one to model time-based effects explicitly, such that one can have full knowledge of when they're dealing with delayed computations, latency, or anything that can not be computed immediately. A common use for this monad is to replace the usual Continuation-Passing Style form of programming, in order to be able to compose and sequence time-dependent effects using the generic and powerful monadic operations.

fun-task - Abstraction for managing asynchronous code in JS

  •    Javascript

An abstraction for managing asynchronous code in JS.* The name is an abbreviation for "functional task" (this library is based on many ideas from Functional Programming). The type that library implements is usually referred to in the documentation as just "Task".


fantasy-future - A Fantasy Land compatible Future Monad implementation

  •    Javascript

A Fantasy Land compatible Future Monad implementation. Basically because promises are too eager. They run as soon as they are created, and this makes controlling side effects of the code difficult. Creating a Future is always a pure operation, and always idempotent. The side effects will only run after a call to fork. This makes it easier to use Futures in function compositions.

fantasy-dict - Fantasy-land compatible dictionary.

  •    Javascript

A dictionary implementing the fantasy-land Monoid, Functor, Foldable and Traversable specifications. Use this when a plain old javascript object as a map won't do, because you want to combine it with some fantasy-land compatible library like Ramda.

ziparray

  •    Javascript

Provides an alternative Apply implementation for arrays. The common implementation of Apply for arrays works with all combinations. However, there is another implementation of Apply for arrays that works in "pairwise" fashion. You can think of this as a data type level encoding of the zip family of functions. Encoding the effect ("pairwise" application) in the data type allows us to write code that expresses our intentions better.

funland - Type classes for interoperability of common algebraic structures in JavaScript, TypeScript and Flow

  •    TypeScript

Funland is a specification of common algebraic structures for JavaScript, TypeScript and Flow, based on Fantasy Land and compatible with static-land. Usage of laws mostly makes sense in tests, being built for property-based testing, so usage of jsverify is recommended, but not required.

further - 🦄🌈🍄 algebraic style composition for functional UIs

  •    Javascript

Further implements FantasyLand 1, FantasyLand 2, FantasyLand 3 compatible Semigroup, Monoid, Functor, Apply, Applicative, Chain, ChainRec and Monad. Hindley-Milner type signatures are used to document functions. Signatures starting with a . refer to "static" functions, whereas signatures starting with a # refer to functions on the prototype.

TsMonad - Little monad library designed for TypeScript

  •    TypeScript

This library provides implementations of the most useful monads outside of Haskell (subjectively, this is Maybe and Either). It also provides a strongly-typed emulation of pattern matching to help enforce program correctness. I won't presume to attempt a monad tutorial here. There are several online - I recommend Douglas Crockford's Monads & Gonads talk.

control.async - Migrating to https://github.com/origamitower/folktale

  •    Javascript

Operations for asynchronous control flow. This will generate the dist/control.async.umd.js file, which you can load in any JavaScript environment.

control.monads - Migrating to https://github.com/origamitower/folktale

  •    LiveScript

Common monad combinators and sequencing operations. This will generate the dist/control.monads.umd.js file, which you can load in any JavaScript environment.

core.lambda - Migrated to https://github.com/origamitower/folktale

  •    LiveScript

This will generate the dist/core.lambda.umd.js file, which you can load in any JavaScript environment. Then open the file docs/index.html in your browser.

data.either - Migrated to https://github.com/origamitower/folktale

  •    Javascript

The Either(a, b) structure represents the logical disjunction between a and b. In other words, Either may contain either a value of type a or a value of type b, at any given time. This particular implementation is biased on the right value (b), thus projections will take the right value over the left one. A common use of this structure is to represent computations that may fail, when you want to provide additional information on the failure. This can force failures and their handling to be explicit, and avoid the problems associated with throwing exceptions — non locality, abnormal exits, etc.

data.maybe - Migrated to https://github.com/origamitower/folktale

  •    Javascript

A structure for values that may not be present, or computations that may fail. Maybe(a) explicitly models the effects that implicit in Nullable types, thus has none of the problems associated with using null or undefined — like NullPointerException or TypeError. Furthermore, being a Monad, Maybe(a) can be composed in manners similar to other monads, by using the generic sequencing and composition operations provided for the common interface in Fantasy Land.