Created
September 30, 2016 09:31
-
-
Save dredozubov/81337aeaffe2aa77195cc6227d214f21 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
printf :: ((String -> IO ()) -> a) -> a | |
printf format = format putStrLn | |
c :: String -> (String -> a) -> a | |
c s k = k s | |
d :: (String -> a) -> Int -> a | |
d k n = k $ show n | |
s :: (String -> a) -> String -> a | |
s = id | |
(%) :: ((String -> a) -> r) -> ((String -> b) -> a) -> ((String -> b) -> r) | |
f1 % f2 = \k -> f1 $ \s1 -> f2 $ \s2 -> k $ s1 ++ s2 | |
zu :: IO () | |
zu = printf (c"hello, "%d%s) 1337 "world!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment