Overview

Adapted from https://github.com/purescript/purescript-prelude/blob/master/src/Data/Field.purs


Table of contents


Field (interface)

Signature

export interface Field<A> extends Ring<A> {
  readonly degree: (a: A) => number
  readonly div: (x: A, y: A) => A
  readonly mod: (x: A, y: A) => A
}

Added in v2.0.0

fieldNumber (constant)

Signature

export const fieldNumber: Field<number> = ...

Added in v2.0.0

gcd (function)

The greatest common divisor of two values

Signature

export function gcd<A>(E: Eq<A>, field: Field<A>): (x: A, y: A) => A { ... }

Added in v2.0.0

lcm (function)

The least common multiple of two values

Signature

export function lcm<A>(E: Eq<A>, F: Field<A>): (x: A, y: A) => A { ... }

Added in v2.0.0