Sha256: fa607a6a53850e4f0549b2d439759e52a7a14a4c88966626b657fd7dfee113f1
Contents?: true
Size: 291 Bytes
Versions: 354
Compression:
Stored size: 291 Bytes
Contents
module Accumulate ( accumulate ) where import Data.List (List(Nil), (:), reverse) accumulate :: forall a b . (a -> b) -> List a -> List b accumulate = let accumulate' acc f Nil = reverse acc accumulate' acc f (v:vs) = accumulate' (f v:acc) f vs in accumulate' Nil
Version data entries
354 entries across 354 versions & 1 rubygems