number

package
v1.0.92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add added in v1.0.7

func Add[T Number](right T) func(T) T

Add is a curried function used to add two numbers

func Div added in v1.0.23

func Div[T Number](right T) func(T) T

Div is a curried function used to divide two numbers

func Inc added in v1.0.7

func Inc[T Number](value T) T

Inc is a function that increments a number

func MagmaDiv added in v1.0.23

func MagmaDiv[A Number]() M.Magma[A]

func MagmaSub

func MagmaSub[A Number]() M.Magma[A]

func Max added in v1.0.11

func Max[A C.Ordered](a, b A) A

Max takes the maximum of two values. If they are considered equal, the first argument is chosen

func Min added in v1.0.11

func Min[A C.Ordered](a, b A) A

Min takes the minimum of two values. If they are considered equal, the first argument is chosen

func MonoidProduct added in v1.0.23

func MonoidProduct[A Number]() M.Monoid[A]

MonoidProduct is the [Monoid] that multiplies elements with a one empty element

func MonoidSum

func MonoidSum[A Number]() M.Monoid[A]

MonoidSum is the [Monoid] that adds elements with a zero empty element

func Mul added in v1.0.18

func Mul[T Number](right T) func(T) T

Mul is a curried function used to multiply two numbers

func SemigroupProduct added in v1.0.23

func SemigroupProduct[A Number]() S.Semigroup[A]

func SemigroupSum

func SemigroupSum[A Number]() S.Semigroup[A]

func Sub added in v1.0.23

func Sub[T Number](right T) func(T) T

Sub is a curried function used to subtract two numbers

Types

type Number added in v1.0.7

type Number interface {
	C.Integer | C.Float | C.Complex
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL