Browse Source

Implement foldable any

DricomDragon 5 years ago
parent
commit
71ccb3f570
1 changed files with 3 additions and 0 deletions
  1. 3 0
      fold.hs

+ 3 - 0
fold.hs

@@ -8,3 +8,6 @@ fmax = foldl max 0
 
 for::[Bool] -> Bool
 for = foldl (||) False
+
+fany::(a->Bool)->[a]->Bool
+fany p xs = for $ map p xs