-
-
Save shawn42/39ac06be6abc96c8a69e to your computer and use it in GitHub Desktop.
IE_lost_without_a_map
This file contains 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
# broken | |
_(candies).filter((candy) -> | |
candy.isChocalate? | |
).map (candy) -> | |
candy.yummy() | |
# plays well with IE8 | |
_(_(candies).filter((candy) -> | |
candy.isChocalate? | |
)).map (candy) -> | |
candy.yummy() | |
# allows for more method chaining | |
_(candies).chain().filter((candy) -> | |
candy.isChocalate? | |
).map((candy) -> | |
candy.yummy() | |
).value() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment