I get this error
---------------------------------
Error after extract::
Multiple arities for Main.printTable: arity 1 at 11:12 arity 3 at 12:12
--------------------------------
Can anyone tell me why?
here is my code
module Main(main) where
type Foo = [String]
addToTable :: String -> Foo -> Foo
addToTable newEntry currentTable = newEntry : currentTable
printTable :: Foo -> IO()
printTable [] = putStr "\n"
printTable x:xs = putStrLn x ++ printTable xs
main = do putStrLn "Enter the key: "
joe <- getLine
putStrLn "Enter the Data: "
fred <- getLine
let tab1 = addToTable joe tab1
-- let tab1 = addToTable fred tab1
-- let tab1 = addToTable "hello" tab1
printTable tab1
return()