:: [a] -> [(a, a)] -package:topograph

Run a computation, returning the pair of its output and its result.
runWriter (listen m) = fmap (fst &&& id) (runWriter m)
Extract the key-value pairs from a structure. When you don't need access to the indices in the result, then toList is more flexible in what it accepts.
toListmap snd . itoList
Normalize a sorted list of elements to a range list.
Normalize an arbitrary list of elements to a range list.