Field overview

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

Added in v2.0.0


Table of contents


model

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

utils

gcd

The greatest common divisor of two values

Signature

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

Added in v2.0.0

lcm

The least common multiple of two values

Signature

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

Added in v2.0.0

zone of death

fieldNumber

Use Field instead.

Signature

export declare const fieldNumber: Field<number>

Added in v2.0.0