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.

  1. newtype Last a

    ghc-internal GHC.Internal.Data.Monoid

    Maybe monoid returning the rightmost non-Nothing value. Last a is isomorphic to Dual (First a), and thus to Dual (Alt Maybe a) Data.Semigroup.Last. The former returns the last non-Nothing, so x <> Data.Monoid.Last Nothing = x. The latter simply returns the last value, thus x <> Data.Semigroup.Last Nothing = Data.Semigroup.Last Nothing.

    Examples

    >>> Last (Just "hello") <> Last Nothing <> Last (Just "world")
    Last {getLast = Just "world"}
    
    >>> Last Nothing <> mempty
    Last {getLast = Nothing}
    

  2. Last :: Maybe a -> Last a

    ghc-internal GHC.Internal.Data.Monoid

    No documentation available.

  3. newtype Last a

    numhask NumHask.Prelude

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

    Examples

    >>> Last 0 <> Last 10
    Last {getLast = 10}
    
    >>> sconcat $ Last 1 :| [ Last n | n <- [2..]]
    Last {getLast = * hangs forever *
    

  4. Last :: a -> Last a

    numhask NumHask.Prelude

    No documentation available.

  5. data Last a

    lens-family-core Lens.Family

    No documentation available.

  6. newtype Last a

    optparse-generic Options.Generic

    Maybe monoid returning the rightmost non-Nothing value. Last a is isomorphic to Dual (First a), and thus to Dual (Alt Maybe a) Data.Semigroup.Last. The former returns the last non-Nothing, so x <> Data.Monoid.Last Nothing = x. The latter simply returns the last value, thus x <> Data.Semigroup.Last Nothing = Data.Semigroup.Last Nothing.

    Examples

    >>> Last (Just "hello") <> Last Nothing <> Last (Just "world")
    Last {getLast = Just "world"}
    
    >>> Last Nothing <> mempty
    Last {getLast = Nothing}
    

  7. Last :: Maybe a -> Last a

    optparse-generic Options.Generic

    No documentation available.

  8. type family Last (xs :: [k]) :: k

    data-diverse Data.Diverse.TypeLevel

    No documentation available.

  9. LAST :: Keyword

    sql-words Language.SQL.Keyword.Type

    No documentation available.

  10. newtype Last a

    testing-feat Test.Feat.Enumerate

    Maybe monoid returning the rightmost non-Nothing value. Last a is isomorphic to Dual (First a), and thus to Dual (Alt Maybe a) Data.Semigroup.Last. The former returns the last non-Nothing, so x <> Data.Monoid.Last Nothing = x. The latter simply returns the last value, thus x <> Data.Semigroup.Last Nothing = Data.Semigroup.Last Nothing.

    Examples

    >>> Last (Just "hello") <> Last Nothing <> Last (Just "world")
    Last {getLast = Just "world"}
    
    >>> Last Nothing <> mempty
    Last {getLast = Nothing}
    

Page 3 of many | Previous | Next