mirror of
https://github.com/correl/elm.git
synced 2025-03-07 04:35:48 -10:00
9 lines
240 B
Text
9 lines
240 B
Text
module StrainExample where
|
|
|
|
import List
|
|
|
|
keep : (a -> Bool) -> List a -> List a
|
|
keep predicate list = List.filter predicate list
|
|
|
|
discard : (a -> Bool) -> List a -> List a
|
|
discard predicate list = (keep (\val -> not (predicate val)) list)
|