Revise accumulate example (the directions specifically forbid using map!)

This commit is contained in:
Erik Simmler 2016-03-16 20:20:10 -04:00
parent 6e036afc7d
commit 3b6ba9da5a

View file

@ -3,4 +3,4 @@ module Accumulate (..) where
accumulate : (a -> b) -> List a -> List b
accumulate func input =
List.map func input
List.foldr (\v c -> func v :: c) [] input