Untitled
public text v1 · immutableprompt s = putStrLn s
readLn
main = do base <- prompt "The base? "
height <- prompt "The height? "
putStrLn $ "The area of that triangle is " ++ show (base * height / 2)
prompt s = putStrLn s
readLn
main = do base <- prompt "The base? "
height <- prompt "The height? "
putStrLn $ "The area of that triangle is " ++ show (base * height / 2)