Skip to main content
Module

x/ramda/source/mathMod.js

:ram: Practical functional Javascript
Latest
import * as ramda from "https://deno.land/x/ramda@v0.27.2/source/mathMod.js";

Variables

mathMod behaves like the modulo operator should mathematically, unlike the % operator (and by extension, R.modulo). So while -17 % 5 is -2, mathMod(-17, 5) is 3. mathMod requires Integer arguments, and returns NaN when the modulus is zero or negative.