@ -1,5 +1,11 @@
package lambda
func MapNil[T any](xs []T, fx func(T)) {
for _, v := range xs {
fx(v)
}
func Map[T any](xs []T, fx func(T) T) []T {
for i, v := range xs {
xs[i] = fx(v)