Applies a list of functions to a list of values — each function runs on every value, then results are concatenated. Part of Ramda Function since v0.3.0 (stable — not deprecated).
Note: Dispatches to an ap method on the first argument if present, and also treats curried functions as applicatives (the S combinator form below).
Syntax
Call R.ap. Start with this line.
Ramda
R.ap(fns, values) or R.ap(fns)(values)
Call
What it does
R.ap(fns, values) or R.ap(fns)(values)
Primary signature.
R.ap(...)
Call the function helper.
Prefer import { ap } from "ramda" when you want a named import.
Library declarations
Ramda
R.ap(fns, values) or R.ap(fns)(values)
Parameters
Parameter
Description
applyF
Required. List of functions, or a curried function (applicative / S form)
applyX
Required. List of values, or a function of the shared input
Return Value
Return Value
Description
*
New list of results (or a function in S form)
Ramda Examples
Example 1 — Official: Multiply & Add
Apply two number helpers to the same list and concatenate the results.
Join. Three blocks in function order — length is fns.length × values.length.
Compatibility
Browser & Runtime Support
R.ap is a Ramda Function helper since v0.3.0. It runs anywhere Ramda runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install ramda.
✓ Stable · Ramda 0.3.0+
R.ap()
Available in full Ramda builds from v0.3.0 onward. Works in evergreen browsers and current Node LTS when Ramda is loaded.
100%With Ramda 0.3+
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.apRamda 0.3.0+
Bottom line: Safe for production once Ramda is loaded. Use the list form for many transforms, or the S combinator form for f(x)(g(x)). Official reference: ramdajs.com/docs/#ap.
Frequently Asked Questions
R.ap applies a list of functions to a list of values. Each function runs on every value, then the results are concatenated. Official: R.ap([R.multiply(2), R.add(3)], [1,2,3]) → [2, 4, 6, 4, 5, 6].