Created
August 3, 2017 16:16
-
-
Save deque-blog/76dab4e707b05740bcafc1592aa51dc0 to your computer and use it in GitHub Desktop.
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
reverse $ into [] (filtering even . indexingFrom 0) [1..10] | |
> [(0, 2), (1, 4), (2, 6), (3, 8), (4, 10)] : List (Int, Integer) | |
reverse $ into [] (indexingFrom 0 . filtering (even . snd)) [1..10] | |
> [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)] : List (Int, Integer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment