Functional programming library for TypeScript

$ npm install pure-ts

Utility functions

Pure provides implementations for common typeclasses like Functor and Monad, along with utility functions that operate on them

Algebraic Data Types

Pure provides a collection of algebraic data structures that will help you tackle common problems that increase code complexity, such as conditional logic and error handling

Practical approach

Pure is a library focused on practical functional programming in TypeScript. You will find many examples and tutorials in the docs section of this site.
const getUsers = (country: Country): User[] => {
    if (!country) {
        return []

    const users = getUsersByCountry(country)

    if (!users) {
        return []

    return users
import { Maybe } from 'pure-ts/adts/Maybe'

const getUsers = (country: Country): User[] =>