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.
lookupIndex :: Ord a => a -> NESet a -> Maybe Intnonempty-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
lookupLE :: Ord a => a -> NESet a -> Maybe anonempty-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
lookupLT :: Ord a => a -> NESet a -> Maybe anonempty-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
lookupSyntax :: Text -> SyntaxMap -> Maybe Syntaxskylighting Skylighting Lookup syntax by (in order) full name (case insensitive), short name (case insensitive), extension.
lookupLang :: Lang -> [(Lang, a)] -> Maybe (Lang, a)unicode-collation Text.Collate.Lang Find best match for a Lang in an association list.
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.
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.
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.
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.
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.