From 13c0046a6dbd41b15358e76856922144ac76e768 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sat, 4 Apr 2015 17:38:20 +0800 Subject: +46 +47 +48 +49 +50 --- H48.hs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 H48.hs (limited to 'H48.hs') diff --git a/H48.hs b/H48.hs new file mode 100644 index 0000000..bba2dcc --- /dev/null +++ b/H48.hs @@ -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 = " " -- cgit v1.2.3-70-g09d2