aboutsummaryrefslogtreecommitdiff
path: root/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utils.hs')
-rw-r--r--Utils.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Utils.hs b/Utils.hs
index 60f8ff5..51eecf8 100644
--- a/Utils.hs
+++ b/Utils.hs
@@ -11,3 +11,6 @@ uniq l = l
contains :: Eq a => [a] -> a -> Bool
contains l v = isJust $ find (== v) l
+
+roundUp :: Integral a => a -> a -> a
+roundUp n sz = (n + sz - 1) `div` sz * sz