mirror of
https://github.com/correl/elm.git
synced 2024-11-15 19:19:31 +00:00
Revise accumulate example (the directions specifically forbid using map!)
This commit is contained in:
parent
6e036afc7d
commit
3b6ba9da5a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue