Hoogle Search
Within LTS Haskell 22.17 (ghc-9.6.4)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
base Data.Monoid Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically.
>>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world")) Just "hello"
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. -
base Data.Monoid No documentation available.
-
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.
-
base Data.Semigroup No documentation available.
-
amazonka-core Amazonka.Prelude Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically.
>>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world")) Just "hello"
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. -
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.
>>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world")) Just "hello"
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. -
base-compat Data.Monoid.Compat No documentation available.
-
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.
-
base-compat Data.Semigroup.Compat No documentation available.
-
Diff Data.Algorithm.Diff No documentation available.
Page 1 of many | Next