Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created August 3, 2017 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/76dab4e707b05740bcafc1592aa51dc0 to your computer and use it in GitHub Desktop.
Save deque-blog/76dab4e707b05740bcafc1592aa51dc0 to your computer and use it in GitHub Desktop.
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