elm/exercises/accumulate/Accumulate.example.elm

7 lines
146 B
Elm
Raw Normal View History

module Accumulate exposing (..)
2015-09-12 13:38:29 -07:00
accumulate : (a -> b) -> List a -> List b
accumulate func input =
List.foldr (\v c -> func v :: c) [] input