Ramda’s R.divide() takes two values and returns a / b. The official docs sample is R.divide(71, 100) → 0.71. Added in v0.1.0. See also R.multiply.
Because Ramda functions are automatically curried, you can lock in one argument and reuse the rest. The docs show two patterns beginners should memorize: R.divide(R.__, 2) builds a half function (the placeholder waits for the first argument), and R.divide(1) builds a reciprocal function.
Syntax
Call R.divide. Start with this line.
Ramda
R.divide(a, b)
Call
What it does
R.divide(a, b)
Primary signature.
R.divide(...)
Call the math helper.
Prefer import { divide } from "ramda" when you want a named import.
Library declarations
Ramda
R.divide(a, b)
Parameters
Parameter
Description
a
Required. the dividend (the value being divided). First argument.
b
Required. the divisor (the value you divide by). Second argument.
Return Value
Return Value
Description
*
Returns a Number: a / b.
Ramda Examples
📚 Getting Started
The official 71 / 100 sample, then the official half helper.
R.divide returns a / b. 71 / 100 is 0.71 — the official sample. Swapping to 2 / 10 gives 0.2, which is why argument order matters.
Example 2 — Official half with R.__
The docs build a reusable half function by filling the divisor and waiting for the dividend.
Ramda
var half = R.divide(R.__, 2);
half(42); //=> 21
half(10); //=> 5
// Without the placeholder, R.divide(2) waits for the divisor:
R.divide(2)(42); //=> 2 / 42 (not a half)
R.__ says “skip this slot.” R.divide(R.__, 2) stores the divisor 2 and waits for a. Plain R.divide(2) stores the dividend instead, so R.divide(2)(42) is 2 / 42, not a half.
📈 Practical Patterns
Official reciprocals, mapping a half helper, and pairwise divide.
R.zipWith calls R.divide on each pair: 10/2, 20/4, 40/5. Dividing by zero follows JavaScript: 1 / 0 is Infinity. Guard divisors in real data.
Compatibility
Browser Support
R.divide() is plain JavaScript division — it runs anywhere Ramda loads: every modern browser plus Node.js. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Ramda 0.1.0+ · Any JS runtime
Ramda.js R.divide()
Load Ramda via CDN or npm, then call R.divide(a, b). Because it only uses a / b, behavior is identical across engines.
100%With Ramda loaded
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
R.divide()Universal
Bottom line: Safe in any project that includes Ramda. Use a CDN build such as ramda.min.js in the browser or install ramda from npm for Node.
Frequently Asked Questions
R.divide(a, b) returns a / b. It is Ramda's curried division helper — the functional equivalent of the / operator — so it can be partially applied and dropped into point-free pipelines.
R.divide(71, 100) returns 0.71. The docs also show const half = R.divide(R.__, 2) with half(42) returning 21, and const reciprocal = R.divide(1) with reciprocal(4) returning 0.25. Added in v0.1.0. See also R.multiply.
Yes. R.divide has arity 2 and is automatically curried, so R.divide(71, 100) and R.divide(71)(100) both return 0.71. Calling it with one argument returns a function that waits for the divisor.
R.__ is Ramda's placeholder. R.divide(R.__, 2) fills the second argument (the divisor) and waits for the first. That is how the official half helper works: half(42) is 42 / 2.
R.divide returns a / b; R.multiply returns a * b. Division is not commutative: R.divide(10, 2) is 5, while R.divide(2, 10) is 0.2. Multiply does not care about order.
No. R.divide is a stable Ramda math helper from v0.1.0. It is not deprecated, experimental, or non-standard.