Skip to content

Instantly share code, notes, and snippets.

@jrm2k6
Created January 28, 2014 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrm2k6/8661856 to your computer and use it in GitHub Desktop.
Save jrm2k6/8661856 to your computer and use it in GitHub Desktop.
-- problem 48
tablen f n = do
let r = generateResultsAsStrings f n
mapM_ putStrLn r
generateResultsAsStrings :: ([Bool] -> Bool) -> Int -> [String]
generateResultsAsStrings f n = map unwords $ map (\x -> (map show x ++ [show (f x)])) $ sequence $ replicate n [True, False]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment