implemented Handlers.incAnchorBy
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user