summaryrefslogtreecommitdiff
path: root/H48.hs
diff options
context:
space:
mode:
Diffstat (limited to 'H48.hs')
-rw-r--r--H48.hs9
1 files changed, 9 insertions, 0 deletions
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 = " "