1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-08-10 22:31:32 +02:00

fix: build break

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-08-10 13:14:48 +02:00
parent d9b2804a7e
commit d9dda4cfa5
2 changed files with 8 additions and 3 deletions

View File

@@ -21,18 +21,18 @@ import (
func UnionSemigroup[N ~map[K]V, K comparable, V any](s S.Semigroup[V]) S.Semigroup[N] {
return S.MakeSemigroup(func(first N, second N) N {
return union(s, first, second)
return union[N, K, V](S.ToMagma(s), first, second)
})
}
func UnionLastSemigroup[N ~map[K]V, K comparable, V any]() S.Semigroup[N] {
return S.MakeSemigroup(func(first N, second N) N {
return unionLast(first, second)
return unionLast[N, K, V](first, second)
})
}
func UnionFirstSemigroup[N ~map[K]V, K comparable, V any]() S.Semigroup[N] {
return S.MakeSemigroup(func(first N, second N) N {
return unionLast(second, first)
return unionLast[N, K, V](second, first)
})
}