JuliaFolds / Transducers.jl

Efficient transducers for Julia
https://juliafolds.github.io/Transducers.jl/dev/
MIT License
432 stars 24 forks source link

Rename `ReduceIf` #462

Open goretkin opened 3 years ago

goretkin commented 3 years ago

The nameReduceIfis quite confusing to me. Something likeStopIf or StopWhen would make a lot more sense. Iterators.takewhile is a related concept, but the predicate has opposite polarity, and as was pointed out on Zulip, handles the final element differently.

I don't think there's a direct connection between ReduceIf and e.g. Base.reduce, which is like "fold".

(from a Zulip discussion with @masonprotter)