2021-10-27
Warm-up functions for drawing the board.
Opener
Put the strings together, inserting the separator between each one.
myB :: String -> [String] -> String
myB _ _ = ""
testB = [ myB "Q" ["R"] == "R",
myB ":" ["A","B","C"] == "A:B:C" ]
1. Alpha
Write a function that takes in a list of numbers and puts out a String with the corresponding letters of the alphabet.
alpha :: [Int] -> String
alpha _ = ""
alphaTest = [
alpha [25] == "Z"
,alpha [1,2,0,0] == "BCAA"
]
2. Beta
Write a function that takes in a list of lists and puts out a String
with each row changed into letters of the alphabet, separated by the
\n
character.
beta :: [[Int]] -> String
beta _ = ""
testBeta = [beta [[1,2,0,0],[5,3,0,4]] == "BCAA\nFDAE"]