Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
first :: Doc a -> Doc a -> Doc apretty Text.PrettyPrint.Annotated.HughesPJ first returns its first argument if it is non-empty, otherwise its second.
-
pretty Text.PrettyPrint.HughesPJ first returns its first argument if it is non-empty, otherwise its second.
first :: Bifunctor p => (a -> b) -> p a c -> p b csemigroupoids Data.Bifunctor.Apply Map covariantly over the first argument.
first f ≡ bimap f id
Examples
>>> first toUpper ('j', 3) ('J',3)
>>> first toUpper (Left 'j') Left 'J'
first :: (a -> a') -> (a, b) -> (a', b)extra Data.Tuple.Extra Update the first component of a pair.
first succ (1,"test") == (2,"test")
first :: (a -> a') -> (a, b) -> (a', b)extra Extra Update the first component of a pair.
first succ (1,"test") == (2,"test")
first :: Bifunctor p => (a -> b) -> p i a c -> p i b coptics-core Optics.Internal.Bi No documentation available.
-
data-accessor Data.Accessor.Tuple Access to the first value of a pair.
first :: Bifunctor p => (a -> b) -> p a c -> p b crio RIO.Prelude Map covariantly over the first argument.
first f ≡ bimap f id
Examples
>>> first toUpper ('j', 3) ('J',3)
>>> first toUpper (Left 'j') Left 'J'
first :: Arrow a => a b c -> a (b, d) (c, d)Cabal-syntax Distribution.Compat.Prelude No documentation available.
first :: Bifunctor p => (a -> b) -> p a c -> p b cstreaming Streaming Map covariantly over the first argument.
first f ≡ bimap f id
Examples
>>> first toUpper ('j', 3) ('J',3)
>>> first toUpper (Left 'j') Left 'J'