Closed
Description
fold_while
has been deprecated in favor of try_fold
, and will eventually be removed ( #223 ). However, there is little documentation on how to actually do this in an idiomatic way.
For example, this playground comparison is the best I could do and it looks awful. The iterator finishing early isn't an error - it's a totally acceptable condition.
I'm sure there's a better way to do this, but it would be nice to document that in fold_while
or, perhaps, in try_fold
(I'll be happy to open a MR for that if someone can give me a good example.)
Metadata
Metadata
Assignees
Labels
No labels