Lodash _.curryRight() method

Beginner
⏱️ 7 min read
📚 Updated: May 2026
🎯 3 Code examples
🚀 3 Try-it labs
Lodash

What you’ll learn

  • How _.curryRight(func, arity) collects arguments from the right, analogous to _.partialRight.
  • Call shapes from the Lodash docs: curried(3)(2)(1), grouped batches, and placeholders.
  • When explicit arity matters and how guard mirrors _.curry.
  • Try each example in the editor (?tryit=1, 2, 3) with Lodash from a CDN.

Prerequisites

Read _.curry() first for shared arity, placeholder, and guard ideas; optional Function hub.

  • Partial application: fixing trailing parameters before leading ones.
  • _.partialRight mindset: arguments bind from the end of the parameter list.

Overview

_.curryRight(func, arity) is the sibling of _.curry: arguments apply from the right toward the left until func receives its full parameter list, then it executes. Official docs describe it as currying “in the manner of _.partialRight.”

Trailing-first calls

Natural fit when later parameters stabilize early.

Placeholder parity

curryRight.placeholder keeps skipped slots flexible mid-chain.

Tree-shakeable

Import lodash/curryRight for focused bundles.

Syntax

javascript
_.curryRight(func, [arity = func.length], [guard])
  • func: function to curry from the right.
  • arity: optional explicit slot count when func.length misreports.
  • guard: iteratee hook shared with _.curry—truthy values drop the arity hint (arity = guard ? undefined : arity).
  • Returns: curried wrapper without restored length metadata (Lodash note).
1

Right-heavy chained calls

Supply c, then b, then a—or pass all three at once—the tuple matches [a, b, c].

javascript
import curryRight from "lodash/curryRight";

const abc = function (a, b, c) {
  return [a, b, c];
};

const curried = curryRight(abc);

curried(3)(2)(1);
// => [1, 2, 3]

curried(1, 2, 3);
// => [1, 2, 3]
Try it Yourself
2

Grouped calls from the right

Two trailing arguments arrive together; the final call supplies the leading parameter.

javascript
import curryRight from "lodash/curryRight";

const abc = function (a, b, c) {
  return [a, b, c];
};

const curried = curryRight(abc);

curried(2, 3)(1);
// => [1, 2, 3]
Try it Yourself
3

curryRight placeholders

Lodash doc pattern: after fixing c, skip one slot then finish with the middle and leading arguments.

javascript
import curryRight from "lodash/curryRight";

const abc = function (a, b, c) {
  return [a, b, c];
};

const curried = curryRight(abc);

curried(3)(1, curryRight.placeholder)(2);
// => [1, 2, 3]
Try it Yourself

📋 _.curryRight vs _.curry

Topic_.curryRight_.curry
Analogy_.partialRight sequencing_.partial sequencing
Typical call vibeLater params first (curried(3)(2)(1))Earlier params first (curried(1)(2)(3))
PlaceholdercurryRight.placeholdercurry.placeholder

Pair this page with _.curry() on this site; for rate-limited callbacks next in the Lodash docs, see _.debounce().

Pitfalls to avoid

Mental model

Reversing call order

Muscle memory from _.curry can flip arguments—trace which parameter each segment binds.

func.length

Arity drift

Same guidance as _.curry: supply arity when metadata lies.

Iteratees

Guard flag

Collection helpers may invoke curryRight with guard semantics—ordinary usage ignores it.

❓ FAQ

curry accumulates arguments starting from the left (like partial). curryRight accumulates from the right (like partialRight), so the first calls bind the trailing parameters of func.
Yes—Lodash merges batches across calls until arity is satisfied, mirroring the documented abc examples.
Use curryRight.placeholder (or the shared Lodash placeholder in monolithic builds) to skip slots while currying from the right.
Whenever func.length is 0 or unreliable so Lodash knows how many segments to expect.
No—Lodash documents that curried helpers do not set length metadata like native functions.
Use import curryRight from "lodash/curryRight"; curryRight.placeholder matches other Lodash placeholder helpers.

Summary

Did you know?

curryRight is implemented with WRAP_CURRY_RIGHT_FLAG inside createWrap—the same guard trick as _.curry (arity = guard ? undefined : arity) so Lodash can reuse it safely as a collection iteratee.

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.

6 people found this page helpful