Skip to content

Instantly share code, notes, and snippets.

@mcmillhj
Last active January 4, 2017 14:51
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/bf0626f36e7917685cf795e1eaa4792f to your computer and use it in GitHub Desktop.
Save mcmillhj/bf0626f36e7917685cf795e1eaa4792f to your computer and use it in GitHub Desktop.
(* fn: ('a -> 'b) -> 'a list -> 'b list *)
fun accumulate _ [] = []
| accumulate f (x::xs) = f x :: accumulate f xs
(* fn: ('a -> 'b) * 'a -> 'b list *)
fun accumulate (f: ('a -> 'b), xs: 'a list): 'b list =
raise Fail "'accumulate' has not been implemented"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment