number

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 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](left T) func(T) T

Add is a curried function used to add 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 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 MonoidSum

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

func SemigroupSum

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

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