github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/predicate/match/api.go (about) 1 // Package match provides short predicate constructors 2 package match 3 4 import "github.com/m4gshm/gollections/predicate" 5 6 // To - match.To alias for the predicate.Match 7 func To[From, To any](getter func(From) To, condition predicate.Predicate[To]) predicate.Predicate[From] { 8 return predicate.Match(getter, condition) 9 } 10 11 // Any - match.Any alias for the predicate.MatchAny 12 func Any[From, To any](getter func(From) []To, condition predicate.Predicate[To]) predicate.Predicate[From] { 13 return predicate.MatchAny(getter, condition) 14 }