Documentation ¶
Overview ¶
Package gcl defines common data types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
func Compare[T constraints.Ordered](a, b T) int
Compare is a function of types CompareFn, which operates of ordered types. Compare(a, b) equals to: -1 if a < b 0 if a == b +1 if a > b
func Equal ¶
func Equal[T comparable](a, b T) bool
Equal is a function of type EqualFn, which operates on the comparable types.
func Greater ¶
func Greater[T constraints.Ordered](a, b T) bool
Greater is a function of type LessFn, which operates on the comparable types. Greater(a, b) is true if a > b.
func Less ¶
func Less[T constraints.Ordered](a, b T) bool
Less is a function of type LessFn, which operates on the comparable types. Less(a, b) is true if a < b.
Types ¶
type Number ¶
type Number interface { constraints.Integer | constraints.Float | constraints.Complex }
Number contains all the different numeric types.
Directories ¶
Path | Synopsis |
---|---|
Package gomaps provides iterators for built-in go maps.
|
Package gomaps provides iterators for built-in go maps. |
Package goslices provides iterators and operations for built-in go slices.
|
Package goslices provides iterators and operations for built-in go slices. |
Package iters defines the general iterator interface and provides different operations on top of them.
|
Package iters defines the general iterator interface and provides different operations on top of them. |
Package lists provides a doubly linked list and various functions useful with lists of any type.
|
Package lists provides a doubly linked list and various functions useful with lists of any type. |
Click to show internal directories.
Click to hide internal directories.