Printing a field with additional dots in haskell
- by Frank Kluyt
I'm writing a function called printField. This function takes an int and a string as arguments and then then prints a field like this "Derp..." with this: printField 7 "Derp". When the field consists of digits the output should be "...3456".
The function I wrote looks like this:
printField :: Int -> String -> String
printField x y = if…