Question: In Haskell Write a function pushRight that takes a string and and an integer n and forms a string of length n by putting spaces
In Haskell
Write a function pushRight that takes a string and and an integer n and forms a string of length n by putting spaces at the front of the string. (n is guaranteed to be greater than or equal to the length of the string, and no more than 40.)
For example, pushRight "crocodile" 12 should return " crocodile" (three leading spaces).
pushRight :: String -> Int -> String
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
