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
- Curry by default: Almost all multi-argument functions are curried.
- ES6 Modules: Everything uses standard ES6 syntax and explicit
.jsspecifiers for native resolution. - No runtime dependencies: Tiny footprint, maximum speed.
- Subpath imports: Imports are decoupled, so you only pay for what you import.