packages feed

saturn-0.1.0.0: source/library/Saturn/Unstable/Extra/Tuple.hs

module Saturn.Unstable.Extra.Tuple where

import qualified Data.Bifunctor as Bifunctor

mapBoth :: (a -> b) -> (a, a) -> (b, b)
mapBoth f = Bifunctor.bimap f f

toSequence :: (Enum a) => (a, a) -> [a]
toSequence = uncurry enumFromTo