lo icon indicating copy to clipboard operation
lo copied to clipboard

Feat: implement `lo.MapwithErr`

Open ei-sugimoto opened this issue 7 months ago • 1 comments

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.

ei-sugimoto avatar Jun 06 '25 14:06 ei-sugimoto

same issue hear #82

toong-mineis avatar Jul 30 '25 06:07 toong-mineis