Documentation ¶
Index ¶
- Constants
- func Abs[T constraints.Signed](value T) T
- func Accumulate[T any](values []T, operation func(a T, b T) T) T
- func All[T any](values []T, predicate func(value T) bool) bool
- func Any[T any](values []T, predicate func(value T) bool) bool
- func Assert(b bool, s string)
- func BoolInt(b bool) int
- func ChunkIntSlice(slice []int, chunkSize int) [][]int
- func ConvertNumeric(s string) (i int)
- func Filter[T any](ss []T, test func(T) bool) (ret []T)
- func GreatestCommonDivisor(a, b interface{}) interface{}
- func GreatestCommonDivisorF[T constraints.Floating](a, b T) T
- func GreatestCommonDivisorI[T constraints.Integral](a, b T) T
- func IntSliceContainsInt(slice []int, number int) bool
- func LowestCommonMultiple(a, b interface{}) interface{}
- func LowestCommonMultipleF[T constraints.Floating](a, b T) T
- func LowestCommonMultipleI[T constraints.Integral](a, b T) T
- func LowestCommonMultipleSlice(numbers []int) int
- func MapKeys[M ~map[K]V, K comparable, V any](m M) (keys []K)
- func MapStringsToIntegers(ss []string) []int
- func MapValues[M ~map[K]V, K comparable, V any](m M) (values []V)
- func None[T any](values []T, predicate func(value T) bool) bool
- func PanicOnError(err error)
- func Transform[T any, U any](values []T, operation func(item T) U) []U
- func TransformWithIndex[T any, U any](values []T, operation func(item T, index int) U) []U
- type CopyableMap
- type CopyableSlice
- type Interval
- type TestExample
Constants ¶
View Source
const NumberChars = "1234567890"
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[T constraints.Signed](value T) T
func Accumulate ¶
func Accumulate[T any](values []T, operation func(a T, b T) T) T
func ChunkIntSlice ¶
func ConvertNumeric ¶
func GreatestCommonDivisor ¶
func GreatestCommonDivisor(a, b interface{}) interface{}
func GreatestCommonDivisorF ¶
func GreatestCommonDivisorF[T constraints.Floating](a, b T) T
func GreatestCommonDivisorI ¶
func GreatestCommonDivisorI[T constraints.Integral](a, b T) T
func IntSliceContainsInt ¶
func LowestCommonMultiple ¶
func LowestCommonMultiple(a, b interface{}) interface{}
func LowestCommonMultipleF ¶
func LowestCommonMultipleF[T constraints.Floating](a, b T) T
func LowestCommonMultipleI ¶
func LowestCommonMultipleI[T constraints.Integral](a, b T) T
func MapKeys ¶
func MapKeys[M ~map[K]V, K comparable, V any](m M) (keys []K)
func MapStringsToIntegers ¶
func MapValues ¶
func MapValues[M ~map[K]V, K comparable, V any](m M) (values []V)
func PanicOnError ¶
func PanicOnError(err error)
func TransformWithIndex ¶
Types ¶
type CopyableMap ¶
type CopyableMap map[string]interface{}
func (CopyableMap) DeepCopy ¶
func (m CopyableMap) DeepCopy() map[string]interface{}
DeepCopy will create a deep copy of this map. The depth of this copy is all-inclusive. Both maps and slices will be considered when making the copy.
type CopyableSlice ¶
type CopyableSlice []interface{}
func (CopyableSlice) DeepCopy ¶
func (s CopyableSlice) DeepCopy() []interface{}
DeepCopy will create a deep copy of this slice. The depth of this copy is all-inclusive. Both maps and slices will be considered when making the copy.
type TestExample ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.