Something went wrong. Try again.
PoC API allowing to add/retrieve synonyms.
Something went wrong. Try again.
synonym-api util.go
248 B · 14 lines
Go
at develop
123456789101112131415package main
func GetCollectionWithoutElements[T comparable](collection []T, excludes ...T) []T { r := []T{} for _, v := range collection { for _, ex := range excludes { if ex == v { continue } r = append(r, v) } } return r}