Yeah to expand on @LostKobrakai 's excellent notes, I wrote this up in a similar thread sometime back that elaborates on this very concretely: Why is Stream.reduce_while missing? - #2 by benwilson512. The key takeaway is this:
They [enum functions] only use more memory if the output of the function needs to hold onto the whole collection.






















