prelude-js logoprelude-js

Introduction

A modular implementation of Haskell's Prelude library in modern JavaScript.

Welcome to the prelude-js documentation!

prelude-js is an ES6-native port of Haskell's standard Prelude. It implements the essential functional programming functions (curry, compose, map, filter, fold, scan, unfold, etc.) in a highly modular, tree-shaking friendly way.

Core Philosophy

  1. Curry by default: Almost all multi-argument functions are curried.
  2. ES6 Modules: Everything uses standard ES6 syntax and explicit .js specifiers for native resolution.
  3. No runtime dependencies: Tiny footprint, maximum speed.
  4. Subpath imports: Imports are decoupled, so you only pay for what you import.

On this page