diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-04-04 17:38:20 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-04-04 17:38:20 +0800 |
commit | 13c0046a6dbd41b15358e76856922144ac76e768 (patch) | |
tree | dfee06a0f90b0b0b6048eafec7c46da253c79328 /H48.hs | |
parent | b47befab3696c40c710ee80f366fa376ec967b30 (diff) | |
download | h99-13c0046a6dbd41b15358e76856922144ac76e768.tar.gz h99-13c0046a6dbd41b15358e76856922144ac76e768.tar.bz2 h99-13c0046a6dbd41b15358e76856922144ac76e768.zip |
+46 +47 +48 +49 +50
Diffstat (limited to 'H48.hs')
-rw-r--r-- | H48.hs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -0,0 +1,9 @@ +import H47 +import Control.Monad (replicateM) + +tablen :: Int -> ([Bool] -> Bool) -> IO () +tablen n f = mapM_ putStrLn [toStr a ++ " => " ++ show (f a) | a <- args n] + where args n = replicateM n [True, False] + toStr = unwords . map (\x -> show x ++ space x) + space True = " " + space False = " " |