Package Exports
- fp-ts
- fp-ts/lib/Applicative
- fp-ts/lib/Apply
- fp-ts/lib/Array
- fp-ts/lib/Array.js
- fp-ts/lib/Bounded
- fp-ts/lib/Chain
- fp-ts/lib/ChainRec
- fp-ts/lib/Console
- fp-ts/lib/Const
- fp-ts/lib/Contravariant
- fp-ts/lib/Either
- fp-ts/lib/Either.js
- fp-ts/lib/EitherT
- fp-ts/lib/Exception
- fp-ts/lib/Extend
- fp-ts/lib/Field
- fp-ts/lib/Foldable
- fp-ts/lib/Free
- fp-ts/lib/Functor
- fp-ts/lib/IO
- fp-ts/lib/Identity
- fp-ts/lib/Monoid
- fp-ts/lib/NonEmptyArray
- fp-ts/lib/Option
- fp-ts/lib/Option.js
- fp-ts/lib/OptionT
- fp-ts/lib/Ord
- fp-ts/lib/Ordering
- fp-ts/lib/Random
- fp-ts/lib/Reader
- fp-ts/lib/ReaderT
- fp-ts/lib/Semigroup
- fp-ts/lib/Set
- fp-ts/lib/Setoid
- fp-ts/lib/State
- fp-ts/lib/StateT
- fp-ts/lib/StrMap
- fp-ts/lib/Task
- fp-ts/lib/TaskEither
- fp-ts/lib/These
- fp-ts/lib/Traversable
- fp-ts/lib/Tuple
- fp-ts/lib/Validation
- fp-ts/lib/Writer
- fp-ts/lib/function
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fp-ts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme

Inspired by
Installation
To install the stable version:
npm install --save fp-ts
TypeScript compatibility
The stable version is tested against TypeScript 2.7.x, but should run with TypeScript 2.2.2+ too
Technical overview
The idea (faking higher kinded types in TypeScript) is based on
- Lightweight higher-kinded polymorphism
- elm-brands
- Higher kinded types in TypeScript, static and fantasy land
- flow-static-land
Ecosystem
- io-ts - TypeScript compatible runtime type system for IO validation
- monocle-ts - Functional optics: a (partial) porting of scala monocle to TypeScript
- newtype-ts - Implementation of newtypes in TypeScript
- logging-ts - Composable loggers for TypeScript
- fp-ts-routing - A type-safe bidirectional routing library for TypeScript
- parser-ts - String parser combinators for TypeScript
- remote-data-ts - RemoteData type (check this article)
Bindings
- fp-ts-rxjs - fp-ts bindings for RxJS
- fp-ts-fluture - fp-ts bindings for Fluture
Documentation
Internals
Examples
- Free monad
- MTL-style
- OptionT monad transformer
- EitherT monad transformer
- StateT monad transformer
- ReaderT monad transformer
- Applicative composition
- Type safe finite state machines with
IxIO
- Moore machines
- Debugging with
Trace
- fantas-eel-and-specification - Code for the Fantas, Eel, and Specification blog series on functional programming by Tom Harding
Note. You can run the examples using ts-node
with tsconfig-paths
$ cd examples
$ ts-node -r tsconfig-paths/register debugging-with-Trace.ts
License
The MIT License (MIT)