elm/exercises/accumulate/Accumulate.example

7 lines
146 B
Text
Raw Normal View History

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