Created
November 29, 2021 16:46
-
-
Save ThoNohT/95f24e1437593baceb6c624e7fb63721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolToString :: Bool -> String | |
boolToString True = "TRUE" | |
boolToString False = "FALSE" | |
assertString :: Eq a => a -> a -> Bool | |
assertString a b = a == b | |
infixr 8 |.| | |
(|.|) :: (b -> c) -> (a -> a' -> b) -> a -> a' -> c | |
(|.|) f g = \x y -> f (g x y) | |
printResult :: Eq a => a -> a -> IO () | |
printResult = putStrLn . boolToString |.| assertString | |
main = do | |
printResult 1 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment