Last active
December 18, 2015 06:09
-
-
Save alindeman/5737727 to your computer and use it in GitHub Desktop.
Revisions
-
alindeman renamed this gist
Jun 9, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ class Iterator < Enumerator def initialize(object, &iterate) super() do |y| y << object -
alindeman revised this gist
Jun 9, 2013 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ class IteratingEnumerator < Enumerator def initialize(object, &iterate) super() do |y| y << object loop { y << object = iterate[object] } end end end -
alindeman created this gist
Jun 9, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ class IteratingEnumerator < Enumerator def initialize(object, &iterate) super() do yield object loop { yield object = iterate[object] } end end end