From 3b6ba9da5ac9b7d0957503199cf797bb8c4d2870 Mon Sep 17 00:00:00 2001 From: Erik Simmler Date: Wed, 16 Mar 2016 20:20:10 -0400 Subject: [PATCH] Revise accumulate example (the directions specifically forbid using map!) --- exercises/accumulate/Accumulate.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/accumulate/Accumulate.example b/exercises/accumulate/Accumulate.example index 7d39e27..b1630c3 100644 --- a/exercises/accumulate/Accumulate.example +++ b/exercises/accumulate/Accumulate.example @@ -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