funcs

package
v0.0.0-...-d4b0244 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add[T Numeric | ~string](x T, y T) T

func Compose

func Compose[A any, B any, C any](f func(arg A) B, g func(arg B) C) func(arg A) C

func ComposeErr

func ComposeErr[A any, B any, C any](f func(arg A) (B, error), g func(arg B) (C, error)) func(arg A) (C, error)

func Div

func Div[T Numeric](x T, y T) T

func DividedBy

func DividedBy[A Numeric](quotient A) func(in A) A

func Identity

func Identity[T any](arg T) T

func Ignore

func Ignore[T any](_ T)

func Mul

func Mul[T Numeric](x T, y T) T

func Nop

func Nop()

func Panic

func Panic(reason any) func()

func Plus

func Plus[A Numeric | ~string](summand A) func(in A) A

func Sub

func Sub[T Numeric](x T, y T) T

func Times

func Times[A Numeric](factor A) func(in A) A

Types

type Numeric

type Numeric interface {
	constraints.Complex | constraints.Integer | constraints.Float
}

Jump to

Keyboard shortcuts

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