Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active July 28, 2017 11:36
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/201f4857cd521426c83304c22efcfe64 to your computer and use it in GitHub Desktop.
Save deque-blog/201f4857cd521426c83304c22efcfe64 to your computer and use it in GitHub Desktop.
-- with transduce
transduce (filtering odd . mapping square) (+) 0 [1..10]
> 165
-- with reduce
reduce (filtering odd . mapping square $ terminal (+)) 0 [1..10]
> 165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment