Skip to content

Instantly share code, notes, and snippets.

@mcmillhj
Created October 8, 2017 23:23
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 mcmillhj/ee81834aa4f7bc5c15e4540851c3bd0c to your computer and use it in GitHub Desktop.
Save mcmillhj/ee81834aa4f7bc5c15e4540851c3bd0c to your computer and use it in GitHub Desktop.
src/Accumulate.idr
module Accumulate
export
accumulate : (a -> b) -> List a -> List b
accumulate f [] = []
accumulate f (x::xs) = f x :: accumulate f xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment