>>> findIndex isSpace "Hello World!" Just 5
>>> findIndex odd [0, 2, 4, 6] Nothing
>>> findIndex even [1..] Just 1
>>> findIndex odd [0, 2 ..] * hangs forever *
>>> findIndices (`elem` "aeiou") "Hello World!" [1,4,7]
>>> findIndices (\l -> length l > 3) ["a", "bcde", "fgh", "ijklmnop"] [1,3]
findWithDefault 'x' 1 (fromList [(5,'a'), (3,'b')]) == 'x' findWithDefault 'x' 5 (fromList [(5,'a'), (3,'b')]) == 'a'
findIndex 2 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map findIndex 3 (fromList [(5,"a"), (3,"b")]) == 0 findIndex 5 (fromList [(5,"a"), (3,"b")]) == 1 findIndex 6 (fromList [(5,"a"), (3,"b")]) Error: element is not in the map
findMax (fromList [(5,"a"), (3,"b")]) == (5,"a") findMax empty Error: empty map has no maximal element
findMin (fromList [(5,"a"), (3,"b")]) == (3,"b") findMin empty Error: empty map has no minimal element
findIndex 2 (fromList [5,3]) Error: element is not in the set findIndex 3 (fromList [5,3]) == 0 findIndex 5 (fromList [5,3]) == 1 findIndex 6 (fromList [5,3]) Error: element is not in the set