Ramda.js R.juxt() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Function

Definition

R.juxt(fns) takes an array of functions and returns a new function. That function calls every fn with the same arguments and returns an array of results in list order. Part of Ramda Function since v0.19.0 (stable — not deprecated).

Stable: Added in Ramda v0.19.0. Not deprecated, experimental, or non-standard. See also R.applySpec.

Syntax

Call R.juxt. Start with this line.

Ramda
R.juxt(fns)
CallWhat it does
R.juxt(fns)Primary signature.
R.juxt(...)Call the function helper.

Prefer import { juxt } from "ramda" when you want a named import.

Library declarations
Ramda
R.juxt(fns)

Parameters

ParameterDescription
fnsRequired. Array of functions to apply

Return Value

Return ValueDescription
*New function → array of each fn's result

Ramda Examples

Example 1 — Official Min / Max Range

Run Math.min and Math.max on the same numbers; collect both results.

Ramda
const getRange = R.juxt([Math.min, Math.max]);

console.log(getRange(3, 4, 9, -3));
// → [-3, 9]
Try It Yourself

How It Works

  1. List the fns. First Math.min, then Math.max.
  2. Same args. Both see 3, 4, 9, -3 in one call.
  3. Results. Min is -3, max is 9.
  4. Array out. Juxt returns [-3, 9] in function order.

Example 2 — Three Views of One String

Uppercase, lowercase, and length from a single string.

Ramda
console.log(R.juxt([R.toUpper, R.toLower, R.length])("Hi"));
// → ["HI", "hi", 2]
Try It Yourself

How It Works

  1. One input. All three functions receive "Hi".
  2. Upper / lower. "HI" and "hi".
  3. Length. 2 characters.
  4. Tuple. Results stay in array order for easy destructuring.

Example 3 — Name and Age as a Tuple

Pull two fields from one object into a two-item list.

Ramda
const person = { name: "Ada", age: 9 };

console.log(R.juxt([R.prop("name"), R.prop("age")])(person));
// → ["Ada", 9]
Try It Yourself

How It Works

  1. Two getters. prop("name") and prop("age").
  2. Same record. Both read from person.
  3. Order. Name first, age second — matches the array.
  4. vs applySpec. Want { name, age }? Use R.applySpec.

Example 4 — R.juxt vs R.converge

Same two branches as the average sample: keep the pair, or divide them.

Ramda
const nums = [1, 2, 3, 4, 5, 6, 7];

console.log(R.juxt([R.sum, R.length])(nums));
// → [28, 7]

console.log(R.converge(R.divide, [R.sum, R.length])(nums));
// → 4
Try It Yourself

How It Works

  1. Same branches. Both use sum and length on nums.
  2. Juxt stops. Returns [28, 7] — the raw pair.
  3. Converge continues. Feeds that pair into divide → 4.
  4. Rule. Want the list? Juxt. Want one value? R.converge.

Example 5 — Inc, Dec, and Negate

Run three unary math helpers on the same number.

Ramda
console.log(R.juxt([R.inc, R.dec, R.negate])(5));
// → [6, 4, -5]
Try It Yourself

How It Works

  1. One number. All three see 5.
  2. Inc / dec. 6 and 4.
  3. Negate. -5.
  4. Array. Handy when you need several transforms side by side.

Browser & Runtime Support

R.juxt is a Ramda Function helper since v0.19.0. It runs anywhere Ramda runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install ramda.

✓ Stable · Ramda 0.19.0+

R.juxt()

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.19.0+
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
R.juxt Ramda 0.19.0+

Bottom line: Safe for production once Ramda is loaded (CDN or npm). Prefer a modular build if you tree-shake. Pair with converge or applySpec when you need a different result shape.

Frequently Asked Questions

R.juxt([f, g, h]) returns a new function. That function calls f, g, and h with the same arguments and returns an array of their results. The docs sample is R.juxt([Math.min, Math.max])(3, 4, 9, -3) //=> [-3, 9]. Added in v0.19.0.
const getRange = R.juxt([Math.min, Math.max]); getRange(3, 4, 9, -3); //=> [-3, 9]. Min is -3, max is 9, and juxt lines them up in an array.
Both run several functions on the same arguments. converge then feeds those results into one more function. juxt stops at the array — like converge whose combiner is 'put the results in a list'.
juxt returns an array in function order. applySpec returns an object with named keys. Same fan-out, different shape.
Yes. Symbolically: R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)]. Every function sees a and b, not each other's results.
No. R.juxt is a stable Ramda function helper from v0.19.0. It is not deprecated, experimental, or non-standard.

Next: R.lift()

Learn how to lift a function so it works over arrays and other applicatives.

R.lift() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful