Created
October 15, 2014 20:05
-
-
Save bbq2100/c7eca65b38030394df64 to your computer and use it in GitHub Desktop.
Lazy collection => View
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 characters
val restrictedList = List(-2, -1, 0, 1, 2) map(2 / _) | |
restrictedList(0) | |
val nonrestrictedList = List(-2, -1, 0, 1, 2).view map(2 / _) | |
nonrestrictedList(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment