Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ruby 1.9 has real iterators now.


They're in 1.8 now too:

    >> [1,2,3].each
    => #<Enumerable::Enumerator:0x801820f10>
    >> RUBY_VERSION
    => "1.8.7"


They've been around for awhile

    >> RUBY_VERSION
    => "1.8"
    >> require "enumerator"
    => true
    >> [1,2,3].each
    => #<Enumerable::Enumerator:0x29326940>




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: