implemented Handlers.incAnchorBy

This commit is contained in:
2021-09-22 20:54:09 -04:00
parent 994e2777c3
commit 89879153de
2 changed files with 27 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ module Helpers (
editParam,
editAnchor,
incParamBy,
incAnchorBy,
incStrBy
) where
@@ -145,6 +146,15 @@ incParamBy
-> Maybe Url
incParamBy n p = editParam p $ incStrBy n
-- | Increment an anchor by a given amount (if possible)
incAnchorBy
:: Integer
-- ^ the amount to increment by
-> Url
-- ^ the 'Url' to edit
-> Maybe Url
incAnchorBy n = editAnchor $ incStrBy n
-- | Increment a 'String' representation of an 'Integer' by a given
-- amount (if possible)
incStrBy