R.liftN(n, fn) is R.lift with the arity written down. You pick how many lists (or other Apply values) the function should map over — even when fn.length is 0 or too small. Part of Ramda Function since v0.7.0 (stable — not deprecated).
Warning: Rest-parameter helpers report length === 0. R.lift would guess wrong — use R.liftN(n, fn) and name the arity yourself.
Syntax
Call R.liftN. Start with this line.
Ramda
R.liftN(n, fn)
Call
What it does
R.liftN(n, fn)
Primary signature.
R.liftN(...)
Call the function helper.
Prefer import { liftN } from "ramda" when you want a named import.
Library declarations
Ramda
R.liftN(n, fn)
Parameters
Parameter
Description
n
Required. Arity — number of lists / Apply values
fn
Required. Plain function (often variadic)
Return Value
Return Value
Description
*
Function that takes n lists / Apply values
Ramda Examples
Example 1 — Official madd3
Sum every combination from three lists with a rest-arg helper.
Misleading length.Math.max reports 2 even though it accepts more.
liftN(3, …). Force three lists: [1,9] × [5] × [2,8].
Four maxes.max(1,5,2), max(1,5,8), max(9,5,2), max(9,5,8).
Use case. Built-ins with wrong .length — always name the arity.
Compatibility
Browser & Runtime Support
R.liftN is a Ramda Function helper since v0.7.0. It runs anywhere Ramda runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install ramda.
✓ Stable · Ramda 0.7.0+
R.liftN()
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.7.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.liftNRamda 0.7.0+
Bottom line: Safe for production once Ramda is loaded (CDN or npm). Prefer a modular build if you tree-shake. Use lift when fn.length already matches the arity you need.
Frequently Asked Questions
R.liftN(n, fn) lifts a function so it maps over n lists (or other Fantasy-Land Apply values). You choose the arity. The docs sample is R.liftN(3, (...args) => R.sum(args))([1,2,3], [1,2,3], [1]) //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]. Added in v0.7.0.
const madd3 = R.liftN(3, (...args) => R.sum(args)); madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]. A rest-arg summer has .length 0, so liftN(3, …) is required. Every combination of one number from each list is summed.
R.lift(fn) is R.liftN(fn.length, fn). Use lift when named parameters already match the number of lists. Use liftN when the function is variadic (rest args, arguments, Math.max) so .length is 0 or too small.
curryN(n, fn) still takes plain values. liftN(n, fn) takes n Apply values (usually lists) and runs fn on every combination. Internally liftN uses curryN, then reduces with R.ap.
The first list is the outermost loop, the last list is the innermost. For madd3([1,2,3], [1,2,3], [1]) you get 1+1+1, 1+2+1, 1+3+1, then 2+1+1, and so on.
No. R.liftN is a stable Ramda function helper from v0.7.0. It is not deprecated, experimental, or non-standard.