Finished the mapping between dynamo attribute values and tamarin values
This commit is contained in:
parent
3bf5b6ec93
commit
348251c1cf
5 changed files with 294 additions and 23 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue