second package:base-prelude

Map covariantly over the second argument.
secondbimap id

Examples

>>> second (+1) ('j', 3)
('j',4)
>>> second (+1) (Right 3)
Right 4