Tuple.purs 267 Bytes
Newer Older
1 2 3 4
module Gargantext.Utils.Tuple where

import Data.Tuple (Tuple(..))

5 6 7 8 9

-- | Similar to
--   https://hackage.haskell.org/package/base-4.19.0.0/docs/Data-Bifunctor.html#v:first
first :: forall a b c. (a -> c) -> Tuple a b -> Tuple c b
first f (Tuple k v) = Tuple (f k) v