Finished the mapping between dynamo attribute values and tamarin values

This commit is contained in:
Leon Mika 2023-01-29 09:12:39 +11:00
parent 3bf5b6ec93
commit 348251c1cf
5 changed files with 294 additions and 23 deletions

View file

@ -1,5 +1,14 @@
package sliceutils
func All[T any](ts []T, predicate func(t T) bool) bool {
for _, t := range ts {
if !predicate(t) {
return false
}
}
return true
}
func Map[T, U any](ts []T, fn func(t T) U) []U {
us := make([]U, len(ts))
for i, t := range ts {