Hoogle Search

Within LTS Haskell 22.18 (ghc-9.6.4)

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

  1. newtype Last a

    base 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)

    >>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))
    Just "world"
    
    Beware that Data.Monoid.Last is different from 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.

  2. Last :: Maybe a -> Last a

    base Data.Monoid

    No documentation available.

  3. newtype Last a

    base Data.Semigroup

    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.

  4. Last :: a -> Last a

    base Data.Semigroup

    No documentation available.

  5. newtype () => Last a

    base-compat Data.Monoid.Compat

    Maybe monoid returning the rightmost non-Nothing value. Last a is isomorphic to Dual (First a), and thus to Dual (Alt Maybe a)

    >>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))
    Just "world"
    
    Beware that Data.Monoid.Last is different from 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.

  6. Last :: Maybe a -> Last a

    base-compat Data.Monoid.Compat

    No documentation available.

  7. newtype () => Last a

    base-compat Data.Semigroup.Compat

    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.

  8. Last :: a -> Last a

    base-compat Data.Semigroup.Compat

    No documentation available.

  9. newtype () => Last a

    base-compat-batteries Data.Monoid.Compat

    Maybe monoid returning the rightmost non-Nothing value. Last a is isomorphic to Dual (First a), and thus to Dual (Alt Maybe a)

    >>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))
    Just "world"
    
    Beware that Data.Monoid.Last is different from 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.

  10. Last :: Maybe a -> Last a

    base-compat-batteries Data.Monoid.Compat

    No documentation available.

Page 1 of many | Next