lo
lo copied to clipboard
Feat: implement `lo.MapwithErr`
Hi, there.
I sometimes wrap lo.Map. Because I wanna check an error.
Error checking can also be done in the following ways.
somethings := lo.FilterMap(slice, func(v T, _ int) (T, bool) {
result, err := TestFunc(v)
return result, err == nil
})
However, I would like to do the following. https://go.dev/play/p/n4p8xrDa0e3
So, I wanna Implement MapWIthErr in lo.
If there is any reason or this issue duplicated, I will close this issue.
same issue hear #82