Hoogle Search

Within LTS Haskell 24.36 (ghc-9.10.3)

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

  1. lookupIndex :: Ord a => a -> NESet a -> Maybe Int

    nonempty-containers Data.Set.NonEmpty

    O(log n). Lookup the index of an element, which is its zero-based index in the sorted sequence of elements. The index is a number from 0 up to, but not including, the size of the set.

    isJust   (lookupIndex 2 (fromList (5:|[3]))) == False
    fromJust (lookupIndex 3 (fromList (5:|[3]))) == 0
    fromJust (lookupIndex 5 (fromList (5:|[3]))) == 1
    isJust   (lookupIndex 6 (fromList (5:|[3]))) == False
    

  2. lookupLE :: Ord a => a -> NESet a -> Maybe a

    nonempty-containers Data.Set.NonEmpty

    O(log n). Find largest element smaller or equal to the given one.

    lookupLT 2 (fromList (3 :| [5])) == Nothing
    lookupLT 4 (fromList (3 :| [5])) == Just 3
    lookupLT 5 (fromList (3 :| [5])) == Just 5
    

  3. lookupLT :: Ord a => a -> NESet a -> Maybe a

    nonempty-containers Data.Set.NonEmpty

    O(log n). Find largest element smaller than the given one.

    lookupLT 3 (fromList (3 :| [5])) == Nothing
    lookupLT 5 (fromList (3 :| [5])) == Just 3
    

  4. lookupSyntax :: Text -> SyntaxMap -> Maybe Syntax

    skylighting Skylighting

    Lookup syntax by (in order) full name (case insensitive), short name (case insensitive), extension.

  5. lookupLang :: Lang -> [(Lang, a)] -> Maybe (Lang, a)

    unicode-collation Text.Collate.Lang

    Find best match for a Lang in an association list.

  6. lookupEQ :: Int -> PrimeIntSet -> Maybe (Prime Int)

    arithmoi Math.NumberTheory.Primes.IntSet

    Find a prime in the set, equal to the given integer, if any exists.

  7. lookupGE :: Int -> PrimeIntSet -> Maybe (Prime Int)

    arithmoi Math.NumberTheory.Primes.IntSet

    Find the smallest prime in the set, greater or equal to the given integer, if any exists.

  8. lookupGT :: Int -> PrimeIntSet -> Maybe (Prime Int)

    arithmoi Math.NumberTheory.Primes.IntSet

    Find the smallest prime in the set, greater than the given integer, if any exists.

  9. lookupLE :: Int -> PrimeIntSet -> Maybe (Prime Int)

    arithmoi Math.NumberTheory.Primes.IntSet

    Find the largest prime in the set, smaller or equal to the given integer, if any exists.

  10. lookupLT :: Int -> PrimeIntSet -> Maybe (Prime Int)

    arithmoi Math.NumberTheory.Primes.IntSet

    Find the largest prime in the set, smaller than the given integer, if any exists.

Page 103 of many | Previous | Next