Last active
January 4, 2017 14:51
-
-
Save mcmillhj/bf0626f36e7917685cf795e1eaa4792f 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
(* 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