Skip to content

Instantly share code, notes, and snippets.

@rcoh
Created July 20, 2012 21:29
Show Gist options
  • Save rcoh/3153369 to your computer and use it in GitHub Desktop.
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