package eq
import "github.com/IBM/fp-go/eq"
Index ¶
- func Contramap[A, B any](f func(b B) A) func(Eq[A]) Eq[B]
- func Equals[T any](eq Eq[T]) func(T) func(T) bool
- func Monoid[A any]() M.Monoid[Eq[A]]
- func Semigroup[A any]() S.Semigroup[Eq[A]]
- type Eq
Functions ¶
func Contramap ¶
Contramap implements an Equals predicate based on a mapping
func Equals ¶
Equals returns a predicate to test if one value equals the other under an equals predicate
func Monoid ¶
func Semigroup ¶
Types ¶
type Eq ¶
func Empty ¶
Empty returns the equals predicate that is always true
func FromEquals ¶
FromEquals constructs an [EQ.Eq] from the comparison function
func FromStrictEquals ¶
func FromStrictEquals[T comparable]() Eq[T]
FromStrictEquals constructs an [EQ.Eq] from the canonical comparison function
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
eq/testing |
- Version
- v1.0.151 (latest)
- Published
- Nov 23, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 5 months ago –
Tools for package owners.