# Ramda: Functional Programming Library for JavaScript

> Ramda is a JavaScript library for functional programming where every function is automatically curried and data arguments come last, making it straightforward to build reusable function pipelines without mutating inputs.

**ramda/ramda** — :ram: Practical functional Javascript

- Repository: https://github.com/ramda/ramda
- Website: https://ramdajs.com
- Stars: 24,047 · Forks: 1,437
- Language: JavaScript
- License: MIT
- Published: 2026-09-21 · Updated: 2026-09-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/ramda-ramda

## What Ramda Is and What Sets It Apart

Ramda is a JavaScript library for functional programming. The README identifies three features that distinguish it from other JavaScript utility libraries.

First, functions never mutate their inputs. Ramda operates on plain JavaScript objects and arrays without modifying them, which makes it easier to reason about program state.

Second, every function is automatically curried. A curried function can accept fewer arguments than it expects and returns a new function waiting for the rest. This means `R.add(1)` returns a function that adds 1 to its argument, and that function can be stored and reused as a named transformation.

Third, the data argument comes last. `R.map(fn, list)` is written with the function before the data. This order is intentional: it makes partial application useful. `R.map(double)` returns a function that doubles every element of a list it receives, ready to be plugged into a pipeline.

These three properties work together to make it easy to define reusable transformations as simple variable assignments and compose them into larger operations.

## Installing Ramda in Node.js, Deno, and the Browser

Install Ramda as an npm package:

```bash
$ npm install ramda
```

Then load it in Node.js using CommonJS or ES modules. For ESM:

```javascript
import * as R from 'ramda';
```

The README notes that Ramda versions above 0.25 do not have a default export. `import R from 'ramda'` will not work; use `import * as R from 'ramda'` or import named functions directly: `import { pipe, map } from 'ramda'`.

For Deno, import from the hosted module:

```javascript
import * as R from "https://deno.land/x/ramda@v0.27.2/mod.ts";
```

For browser use without a bundler, load from a CDN:

```html
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.31.3/ramda.min.js"></script>
```

or from jsDelivr:

```html
<script src="//cdn.jsdelivr.net/npm/ramda@0.31.3/dist/ramda.min.js"></script>
```

These script tags add the variable `R` to the browser's global scope. The README warns against using the `@latest` CDN tag since API changes between releases could break code without any local change.

## Auto-Currying, Data-Last Functions, and Pipelines

Currying in Ramda is automatic and transparent. Define a transformation once and apply it partially:

```javascript
const R = require('ramda');
```

From that import, `R.add(10)` returns a function that adds 10 to any number. `R.filter(R.propEq('type', 'admin'))` returns a function that filters a list of objects, keeping only those whose `type` property equals `'admin'`. Neither expression does any work until you pass the remaining argument.

The data-last convention makes `R.pipe` and `R.compose` the natural way to build larger operations. `R.pipe` takes a sequence of functions and returns a new function that passes its argument through each in order. This produces code that reads as a sequence of named transformations rather than as a chain of nested calls.

The README links to a series of introductory articles and talks in its Introductions section, including "Thinking in Ramda" by Randy Coulman, which describes how to reason about programs in Ramda's style. The philosophy section explicitly states: "Using Ramda should feel much like just using JavaScript."

## Building a Partial Bundle for Smaller Applications

Ramda's full distribution includes over 200 functions. For applications that only use a subset, the repository supports partial builds that include only the specified functions:

```bash
npm run --silent partial-build compose reduce filter > dist/ramda.custom.js
```

This produces a custom build that includes `compose`, `reduce`, `filter`, and all their dependencies. The README notes this requires Node.js and Ramda's development dependencies installed via `npm install` before running.

The `npm run build` command creates both an ESM build in the `es/` directory and a CommonJS build in the `src/` directory, and updates the UMD bundles in `dist/`. The package.json exports field maps the `.`, `./es/*`, `./src/*`, and `./dist/*` paths to the appropriate directories.

Importing named functions directly (`import { pipe } from 'ramda'`) also allows bundlers like webpack or esbuild to tree-shake unused functions when processing an ES module build, which achieves a similar reduction without the manual partial-build step.

## Limitations: TypeScript Types, Performance, and Learning Curve

Ramda's automatic currying is implemented dynamically, which means TypeScript cannot infer the types of partially applied functions reliably without explicit type annotations. The community maintains type definitions, but deeply composed pipelines often require manual type signatures that a non-curried library would infer automatically. fp-ts, a competing functional library, addresses this by using more explicit type encoding at the cost of more verbose code.

The philosophy section of the README states: "Ramda strives for performance. A reliable and quick implementation wins over any notions of functional purity." In practice, the overhead of currying means Ramda functions are somewhat slower than equivalent hand-written iterations. For CPU-intensive data processing on large arrays, lodash's iteration utilities may outperform Ramda's equivalent operations because lodash does not pay the currying overhead.

The learning curve is real. Point-free style, where functions are composed by name without writing out the argument, takes time to read fluently. Code that chains three curried transformations through `R.pipe` is expressive once you understand the pattern, but opaque to developers unfamiliar with it.

## Ramda vs Lodash: Different Goals

Lodash is the most commonly compared alternative. Both are JavaScript utility libraries, but their design goals differ significantly. Lodash is a general-purpose utility toolkit suitable for multiple programming styles. It provides both a standard API and a lodash/fp variant that follows the data-last convention. Lodash's `_.chain()` offers a fluent chaining API as an alternative to composition.

Ramda is designed specifically for functional programming. Every function is curried. There is no opt-in required for data-last behavior or currying; it is the default everywhere. Ramda does not have a non-functional API variant.

For teams that want some functional utilities alongside general-purpose helpers, Lodash (or its smaller cousin Lodash/fp) offers a gentler adoption path. For teams that want a consistent, fully functional style across a codebase, Ramda's unified conventions reduce the number of decisions to make when combining functions.

The README notes the Fantasy Land specification compliance, which means Ramda's functions work with compatible algebraic data types from other libraries in that ecosystem.

## Maintenance, License, and Project Status

Ramda is MIT licensed. The project lists four primary contributors in the package.json: Scott Sauyet, Michael Hurley, David Chambers, and Graeme Yeates. The most recent release is v0.32.0, published on 2025-10-10. The repository's last push was on 2026-09-28, confirming ongoing maintenance.

Testing runs via mocha from the console or via testem for cross-browser runs. The README documents both paths. The test suite is in the test/ directory; the Makefile exposes `make test` as the entry point after building the UMD distribution.

A Cookbook of functions built from Ramda that serve common patterns is linked from the README at github.com/ramda/ramda/wiki/Cookbook. A community REPL is referenced in the related searches as "Try Ramda." Funding for the project is managed through Open Collective.

## Conclusion

Ramda suits JavaScript developers who want to write programs as compositions of pure, reusable functions rather than as sequences of mutations, and who can tolerate the learning curve of currying and point-free style. It is a poor fit for codebases that need TypeScript's strict type inference to follow through deeply composed pipelines, since Ramda's dynamic currying makes inferring types difficult without additional type wrappers. Install with `npm install ramda` and import only the functions you need with `import { pipe, map, filter } from 'ramda'` to keep bundle size manageable, since the partial-build command can create a subset bundle of only the functions your application uses.

## FAQ

### What is Ramda?

Ramda is a JavaScript library for functional programming. Every function is automatically curried and takes data as the last argument, making it easy to build reusable function pipelines without mutating input data.

### How does Ramda compare to Lodash?

Lodash is a general-purpose utility library that supports multiple programming styles; Ramda is designed specifically for functional programming, with every function curried and data-last by default. Lodash has a larger ecosystem and gentler adoption curve; Ramda provides consistent functional conventions across all its functions.

### What is the difference between R.pipe and R.compose in Ramda?

R.pipe passes data through a sequence of functions left to right: the output of the first function becomes the input of the second. R.compose applies functions right to left, which matches mathematical function composition notation. Both produce the same result when the order of functions is reversed.

### What are the alternatives to Ramda?

Lodash/fp provides data-last, curried functions with a larger ecosystem. fp-ts offers a TypeScript-first functional approach with more precise type inference. Remeda is a newer TypeScript-first library with similar goals to Ramda. Each trades some of Ramda's consistency for stronger TypeScript integration or a larger utility set.

## Sources

- [License: MIT](https://github.com/ramda/ramda/blob/master/LICENSE)
- [Project website](https://ramdajs.com)
- [ramda/ramda on GitHub](https://github.com/ramda/ramda)
- [README](https://github.com/ramda/ramda/blob/master/README.md)
- [Releases](https://github.com/ramda/ramda/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/ramda-ramda
