diff options
Diffstat (limited to 'utils.hs')
| -rw-r--r-- | utils.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -37,3 +37,6 @@ splitToPair f lst = let x' = takeWhile (not . f) lst y' = dropWhile (not . f) lst $> drop 1 in (x', y') + +count :: (a -> Bool) -> [a] -> Int +count pred xs = xs $> filter pred .> length
\ No newline at end of file |
