Suggest an editImprove this articleRefine the answer for “Currying vs partial application”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Currying** transforms a function with several arguments into a chain of functions, each accepting exactly one argument, while **partial application** creates a new function with some arguments pre-set, without changing how many arguments it takes. **Key point:** currying always returns a function expecting exactly one more argument, while partial application can accept several remaining arguments at once.Shown above the full answer for quick recall.Answer (EN)Image**Partial application** and **currying** are indeed similar - both techniques let you **pass arguments to a function partially**. But there is a **clear difference in essence and purpose** between them. --- ## 1. Definitions ### **Currying** Transforms a function with *n* arguments into a chain of functions, each of which takes **exactly one argument**. ```javascript // Original function function add(a, b, c) { return a + b + c; } // Curried version const curriedAdd = a => b => c => a + b + c; curriedAdd(1)(2)(3); // 6 ``` Each call returns a new function that expects the next argument. Currying is a **pure functional transformation of the signature**. --- ### **Partial Application** Creates a new function with **pre-set (partially applied)** arguments, but **does not change the number of arguments** the function takes. ```javascript function add(a, b, c) { return a + b + c; } // Partially apply the first argument const add1 = add.bind(null, 1); add1(2, 3); // 6 ``` > Partial application simply fixes some of the arguments, and the rest can be passed later **together**. --- ## 2. The main difference | Criterion | **Currying** | **Partial Application** | |---|---|---| | **What it does** | Splits the function into a chain of one-argument functions | Fixes part of the original function's arguments | | **Arguments per step** | 1 argument per call | Several arguments can be passed at once | | **Returns** | A function expecting **one** next argument | A function expecting the **remaining** arguments | | **Call example** | `f(a)(b)(c)` | `f(a, b)(c)` or `f(a)(b, c)` | | **Purpose** | Unifying calls and composition | Reusing a function with pre-set arguments | --- ## Example for clarity: ### Currying: ```javascript const multiply = a => b => c => a * b * c; multiply(2)(3)(4); // 24 ``` ### Partial application: ```javascript function multiply(a, b, c) { return a * b * c; } const double = multiply.bind(null, 2); // fix a=2 double(3, 4); // 24 ``` --- ## Summary: > **Currying** is a formal transformation of a function into a sequence of one-argument calls. > **Partial Application** is a practical technique for pre-filling part of the arguments and passing the rest later.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.