Skip to main content
Module

x/fun/mod.ts>number.divides

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function number.divides
import { number } from "https://deno.land/x/fun@v2.0.0-alpha.12/mod.ts";
const { divides } = number;

Return true if first evenly divides second.

Examples

Example 1

import * as N from "./number.ts";
import { pipe } from "./fn.ts";

const result1 = pipe(2, N.divides(3)); // false
const result2 = pipe(2, N.divides(4)); // true

Parameters

second: number

Returns

(first: number) => boolean