lambda/fold.go

10 lines
147 B
Go
Raw Normal View History

2022-03-26 19:16:31 +00:00
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)
}