Sha256: b2b943c3f31d9967b7fb76e28e7c356f7db2b679d88beabc4862062adb46aec0
Contents?: true
Size: 435 Bytes
Versions: 66
Compression:
Stored size: 435 Bytes
Contents
module Strain exposing (discard, keep) import List keep : (a -> Bool) -> List a -> List a keep predicate list = List.foldr (consIf predicate) [] list discard : (a -> Bool) -> List a -> List a discard predicate list = List.foldr (consIf (\v -> not <| predicate v)) [] list consIf : (a -> Bool) -> a -> List a -> List a consIf predicate value list = if predicate value then value :: list else list
Version data entries
66 entries across 66 versions & 1 rubygems