3 ms·
First, why not allow your predicate to throw? Maybe your program will be better structured that way. Second, if you pass a predicate that is not declared `thro
by mayoff 10y ago
First, why not allow your predicate to throw? Maybe your program will be better structured that way.
Second, if you pass a predicate that is not declared `throws`, then the compiler treats `drop(while:)` as if it cannot throw either. This is what `rethrows` means: it makes `drop(while:)` covariant (in terms of throws-ness) with `predicate`.