R.curry(fn) returns a curried equivalent of fn. You can pass arguments one at a time, in groups, or all at once — and skip slots with R.__. Part of Ramda Function since v0.1.0 (stable — not deprecated).
Warning: Default parameters do not count toward fn.length, so curry may wait for fewer arguments than you expect. Prefer R.curryN when you must set arity yourself.
Syntax
Call R.curry. Start with this line.
Ramda
R.curry(fn)
Call
What it does
R.curry(fn)
Primary signature.
R.curry(...)
Call the function helper.
Prefer import { curry } from "ramda" when you want a named import.
Library declarations
Ramda
R.curry(fn)
Parameters
Parameter
Description
fn
Required. Function to curry; arity from fn.length
Return Value
Return Value
Description
*
Curried function (also accepts R.__ gaps)
Ramda Examples
Example 1 — Official addFourNumbers
Wrap a four-argument adder, supply two numbers, then the third, then the fourth.
Ramda
const addFourNumbers = (a, b, c, d) => a + b + c + d;
const curriedAddFourNumbers = R.curry(addFourNumbers);
const f = curriedAddFourNumbers(1, 2);
const g = f(3);
console.log(g(4));
// → 10
Plain call.volume(2) returns a number (NaN with missing args), not a function.
Chain breaks. Calling that result again throws TypeError.
Curry wraps.R.curry(volume) waits for three numbers across calls.
Result.(2)(3)(4) → 2 * 3 * 4 = 24.
Compatibility
Browser & Runtime Support
R.curry is a Ramda Function helper since v0.1.0. It runs anywhere Ramda runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install ramda.
✓ Stable · Ramda 0.1.0+
R.curry()
Available in [email protected] full builds once the library is loaded. Works in evergreen browsers and current Node LTS when Ramda is installed. No extra browser API is required.
100%With Ramda 0.1.0+
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
R.curryRamda 0.1.0+
Bottom line: Safe for production once Ramda is loaded (CDN or npm). Prefer a modular build if you tree-shake. IE and very old engines are fine only if your Ramda bundle targets them.
Frequently Asked Questions
R.curry(fn) returns a curried equivalent of fn. You can supply arguments one at a time or in groups. The original function runs only when every required argument is present. Arity comes from fn.length.
const addFourNumbers = (a, b, c, d) => a + b + c + d; const curriedAddFourNumbers = R.curry(addFourNumbers); then f = curriedAddFourNumbers(1, 2), g = f(3), g(4) yields 10. Added in v0.1.0. See also R.curryN and R.partial.
No. For a ternary g the docs list four equivalent styles: g(1)(2)(3), g(1)(2, 3), g(1, 2)(3), and g(1, 2, 3). Mix groups until the arity is full.
R.__ is a placeholder that leaves a gap so you can fill a later argument first. If g is a curried ternary, g(R.__, 2, 3)(1) equals g(1, 2, 3).
Default parameters do not count toward fn.length. R.curry((a, b, c = 2) => a + b + c) waits for only two arguments. h(1)(2) already returns a number, so h(1)(2)(7) throws. Use R.curryN when you must set the arity yourself.
No. R.curry is a stable Ramda function helper from v0.1.0. It is not deprecated, experimental, or non-standard.