summaryrefslogtreecommitdiffstats
path: root/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utils.hs')
-rw-r--r--Utils.hs7
1 files changed, 7 insertions, 0 deletions
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