Skip to content

Instantly share code, notes, and snippets.

@bdimcheff
Created November 9, 2011 21:21
Show Gist options
  • Save bdimcheff/1353078 to your computer and use it in GitHub Desktop.
Save bdimcheff/1353078 to your computer and use it in GitHub Desktop.
module EnumerableExtensions
def lazy_map(&block)
Enumerator.new do |yielder|
each do |e|
yielder << block.call(e)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment