From b1aa17616f56517fa83607296c25ee6c333968c1 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 28 Dec 2014 22:16:47 +0100 Subject: purge a bit of legacy & cruft There's still both around, though..^_^ --- Utils.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Utils.hs') diff --git a/Utils.hs b/Utils.hs index 2ccf4f7..8d1f624 100644 --- a/Utils.hs +++ b/Utils.hs @@ -14,3 +14,10 @@ withTempFile tmpdir template = mintercalate :: Monoid b => b -> [b] -> b mintercalate c (h:t) = foldl (\acc x -> acc <> c <> x) h t mintercalate _ [] = mempty + + +padl :: Int -> a -> [a] -> [a] +padl n c s = + if length s < n + then padl n c (c:s) + else s -- cgit v1.2.3