diff options
Diffstat (limited to 'Utils.hs')
-rw-r--r-- | Utils.hs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |