Guest User

Untitled

a guest
Jul 15th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. printRow h [] = []
  2. printRow h (x:xs) | x>=h = "|" ++ printRow h xs
  3. | otherwise = " " ++ printRow h xs
  4.  
  5. createRow 0 xs = putStr ""
  6. createRow h xs = putChar '\n' >> putStr (printRow h xs) >> createRow (h-1) xs
  7.  
  8. histogram xs = createRow (maximum xs) xs
Add Comment
Please, Sign In to add comment