elm/exercises/accumulate/Accumulate.example.elm
2016-12-17 17:29:40 -05:00

6 lines
146 B
Elm

module Accumulate exposing (..)
accumulate : (a -> b) -> List a -> List b
accumulate func input =
List.foldr (\v c -> func v :: c) [] input