R.partial(fn, args) returns a new function that calls fn with the leftmost arguments already filled. Later calls supply the remaining arguments.
Stable:R.partial has been in Ramda since v0.10.0. It is not deprecated, experimental, or non-standard. The returned function is not auto-curried — see R.curry if you need that.
Syntax
Call R.partial. Start with this line.
Ramda
R.partial(fn, args)
Call
What it does
R.partial(fn, args)
Primary signature.
R.partial(...)
Call the function helper.
Prefer import { partial } from "ramda" when you want a named import.
Library declarations
Ramda
R.partial(fn, args)
Parameters
Parameter
Description
fn
Required. Original function
args
Required. Array of leftmost arguments to lock
Return Value
Return Value
Description
*
Plain function; arity ≈ fn.length - args.length
Ramda Examples
Example 1 — Official double
Lock the first factor as 2. Calling the result with 3 multiplies.
Ramda
const multiply2 = (a, b) => a * b;
const double = R.partial(multiply2, [2]);
console.log(double(3));
// → 6
Full call.partial(add3, [1])(2, 3) supplies all three → 6.
Short call. Passing only 2 leaves c undefined → NaN.
Curry waits.curry(add3)(1)(2) is still a function.
Rule. Use partial to lock a list; use curry to supply args one by one.
Compatibility
Browser & Runtime Support
R.partial is a Ramda Function helper since v0.10.0. It is plain JavaScript — no special browser API. It runs anywhere Ramda loads (CDN, npm, bundler).
✓ Stable · Ramda 0.10.0+
R.partial()
Available in Ramda builds from 0.10.0 onward. Works in evergreen browsers and current Node LTS / Bun / Deno when Ramda is installed.
100%With Ramda 0.10+
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.partialRamda 0.10.0+
Bottom line: Safe for production once Ramda 0.10.0+ is loaded. Use a CDN build such as ramda.min.js in the browser, or npm install ramda for Node. No polyfill is needed beyond shipping Ramda itself.
Frequently Asked Questions
R.partial(fn, args) returns a new function. That new function calls fn with the args list first, then whatever you pass later. Symbolically: R.partial(f, [a, b])(c, d) = f(a, b, c, d). Added in v0.10.0. See also R.partialRight and R.curry.
double = R.partial(multiply2, [2]); double(3) //=> 6. Then a greet function: sayHello = R.partial(greet, ['Hello']); sayHelloToMs = R.partial(sayHello, ['Ms.']); sayHelloToMs('Jane', 'Jones') //=> 'Hello, Ms. Jane Jones!'.
partial takes a list of already-known left arguments and returns a plain function for the rest. That result is not auto-curried: missing later arguments become undefined. curry lets you supply arguments one at a time and waits until it has enough.
partial glues the list on the left. partialRight glues the list on the right. R.partial(sub, [10])(3) is 10 - 3. R.partialRight(sub, [3])(10) is also 10 - 3, because 3 is the last argument.
No. Only R.partial itself is curried (you may write R.partial(fn)(args)). The function it returns has arity Math.max(0, fn.length - args.length) and runs as soon as you call it.
No. R.partial is a stable Ramda Function helper from v0.10.0. It is not deprecated, experimental, or non-standard.