itertools icon indicating copy to clipboard operation
itertools copied to clipboard

`map_err` and other error-only methods

Open Kinrany opened this issue 4 years ago • 0 comments

Feature request: add methods like map_err that work on errors only, similar to map_ok.

To match the existing _ok methods, that would be:

  • filter_map_err
  • filter_err
  • flatten_err
  • fold_err
  • map_err

Out of these five, map_err and filter_err seem the most obviously useful.

Kinrany avatar Oct 05 '21 21:10 Kinrany