Skip to content

Instantly share code, notes, and snippets.

@rcoh
Created July 20, 2012 21:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rcoh/3153369 to your computer and use it in GitHub Desktop.
view vs. non view
def nonview = (1 to 5000000).map(_ % 10).filter(_ > 5).reduce(_ + _)
def view = (1 to 5000000).view.map(_ % 10).filter(_ > 5).reduce(_ + _)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment