Hoogle Search

Within LTS Haskell 22.22 (ghc-9.6.5)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. newtype First a

    base Data.Monoid

    Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically. Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

    Examples

    >>> First (Just "hello") <> First Nothing <> First (Just "world")
    First {getFirst = Just "hello"}
    
    >>> First Nothing <> mempty
    First {getFirst = Nothing}
    

  2. First :: Maybe a -> First a

    base Data.Monoid

    No documentation available.

  3. newtype First a

    base Data.Semigroup

    Beware that Data.Semigroup.First is different from Data.Monoid.First. The former simply returns the first value, so Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing. The latter returns the first non-Nothing, thus Data.Monoid.First Nothing <> x = x.

    Examples

    >>> First 0 <> First 10
    First 0
    
    >>> sconcat $ First 1 :| [ First n | n <- [2 ..] ]
    First 1
    

  4. First :: a -> First a

    base Data.Semigroup

    No documentation available.

  5. data () => First a

    amazonka-core Amazonka.Prelude

    Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically. Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

    Examples

    >>> First (Just "hello") <> First Nothing <> First (Just "world")
    First {getFirst = Just "hello"}
    
    >>> First Nothing <> mempty
    First {getFirst = Nothing}
    

  6. newtype () => First a

    base-compat Data.Monoid.Compat

    Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically. Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

    Examples

    >>> First (Just "hello") <> First Nothing <> First (Just "world")
    First {getFirst = Just "hello"}
    
    >>> First Nothing <> mempty
    First {getFirst = Nothing}
    

  7. First :: Maybe a -> First a

    base-compat Data.Monoid.Compat

    No documentation available.

  8. newtype () => First a

    base-compat Data.Semigroup.Compat

    Beware that Data.Semigroup.First is different from Data.Monoid.First. The former simply returns the first value, so Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing. The latter returns the first non-Nothing, thus Data.Monoid.First Nothing <> x = x.

    Examples

    >>> First 0 <> First 10
    First 0
    
    >>> sconcat $ First 1 :| [ First n | n <- [2 ..] ]
    First 1
    

  9. First :: a -> First a

    base-compat Data.Semigroup.Compat

    No documentation available.

  10. First :: a -> PolyDiff a b

    Diff Data.Algorithm.Diff

    No documentation available.

Page 1 of many | Next