second package:base

Send the second component of the input through the argument arrow, and copy the rest unchanged to the output. The default definition may be overridden with a more efficient version if desired.
d ╭─────╮ d
>───┼─────┼───>
>───┼─ f ─┼───>
b ╰─────╯ c
Map covariantly over the second argument.
secondbimap id

Examples

>>> second (+1) ('j', 3)
('j',4)
>>> second (+1) (Right 3)
Right 4
Traverses only over the second argument.
secondA f ≡ bitraverse pure f

Examples

Basic usage:
>>> secondA (find odd) (Left [])
Just (Left [])
>>> secondA (find odd) (Left [1, 2, 3])
Just (Left [1,2,3])
>>> secondA (find odd) (Right [4, 5])
Just (Right 5)
>>> secondA (find odd) ([1, 2, 3], [4, 5])
Just ([1,2,3],5)
>>> secondA (find odd) ([1,2,3], [4])
Nothing
Haskell type representing the C suseconds_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)
Haskell type representing the C useconds_t type. (The concrete types of Foreign.C.Types#platform are platform-specific.)