Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (22 sloc) 826 Bytes
module Y2017.M05.D16.Exercise where
{--
So, yesterday we were able to publish log entries with time-stamps. YAY! AND
it worked perfectly, because, well, it's 2017 and the Julian date is 123.
And the hour, minute and second were all greater than 10.
WHAT A COINCIDENCE!
That's great. But what if we didn't have these perfect storm of conincidences?
What? Are we going to throw up our hands in resignation? Are we going to throw
up our hands in disgust and resignation?
I SAY THEE NAY!
So. GIVEN an integral, and GIVEN the number of spaces it's supposed to occupy
RETURN a string of that number with zeros as prefixes.
--}
justify :: Integral a => a -> Int -> String
justify num slots = undefined
{--
SO!
>>> justify 7 2
07
DO IT TO IT!
--}
-- Now, go back to yesterday's problem and roll justify into the solution.