10 lines
147 B
Go
10 lines
147 B
Go
|
package lambda
|
||
|
|
||
|
func Foldl[T any](xs []T, fx func(T, T) T) T {
|
||
|
return *new(T)
|
||
|
}
|
||
|
|
||
|
func Foldr[T any](xs []T, fx func(T, T) T) T {
|
||
|
return *new(T)
|
||
|
}
|