filterByPredicate

This commit is contained in:
2024-11-29 19:33:07 +03:00
parent 7ccdb8346e
commit f05a39da06
2 changed files with 17 additions and 2 deletions

View File

@@ -6,4 +6,9 @@ main :: IO ()
main = do
putStrLn $ "Примеры работы `isCongruent`"
putStrLn $ "isCongruent 10 12 2: " ++ show (isCongruent 10 12 2)
putStrLn $ "isCongruent 10 11 2: " ++ show (isCongruent 10 11 2)
putStrLn $ "isCongruent 10 11 2: " ++ show (isCongruent 10 11 2)
putStrLn $ "\nПример работы `filterByPredicate`"
let predicate x = x > 5
putStrLn $ "filterByPredicate (>5) [1, 6, 3, 7, 2]: "
++ show (filterByPredicate predicate [1 :: Int, 6, 3, 7, 2])