Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printRow h [] = []
- printRow h (x:xs) | x>=h = "|" ++ printRow h xs
- | otherwise = " " ++ printRow h xs
- createRow 0 xs = putStr ""
- createRow h xs = putChar '\n' >> putStr (printRow h xs) >> createRow (h-1) xs
- histogram xs = createRow (maximum xs) xs
Add Comment
Please, Sign In to add comment