3 ms·
No idea what that statement does and I'm a rubyist. Anyway I think that Enumerator::Lazy is what one should use in most cases. Quite syntax heavy compared to Py
by pmontra 6y ago
No idea what that statement does and I'm a rubyist. Anyway I think that Enumerator::Lazy is what one should use in most cases. Quite syntax heavy compared to Python though, but what is not in the very core of a language is always more verbose.
https://ruby-doc.org/core-3.0.0/Enumerator/Lazy.html https://ruby-doc.org/core-3.0.0/Enumerator/Lazy.html
- inopinatus 6y agoHopefully you do actually recognise what that does: the standard library has many methods documented to return an enumerator if no block is given. This is how.