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. () :: Eq α => [α] -> α -> Bool

    base-unicode-symbols Data.List.Unicode

    (∋) = flip (∈) U+220B, CONTAINS AS MEMBER

  2. () :: Eq α => [α] -> α -> Bool

    base-unicode-symbols Data.List.Unicode

    (∌) = flip (∉) U+220C, DOES NOT CONTAIN AS MEMBER

  3. has :: Ord a => [a] -> a -> Bool

    data-ordlist Data.List.Ordered

    The has function returns True if the element appears in the list; it is equivalent to member except the order of the arguments is reversed, making it a function from an ordered list to its characteristic function.

  4. hasElem :: Ord a => [a] -> a -> Bool

    Agda Agda.Utils.List

    Check membership for the same list often. Use partially applied to create membership predicate hasElem xs :: a -> Bool.

    • First time: O(n log n) in the worst case.
    • Subsequently: O(log n).
    Specification: hasElem xs == (elem xs).

  5. hasElem :: Ord a => [a] -> a -> Bool

    cabal-install Distribution.Client.Utils

    hasElem xs x = elem x xs except that xs is turned into a Set first. Use underapplied to speed up subsequent lookups, e.g. filter (hasElem xs) ys. Only amortized when used several times! Time complexity <math> for <math> lookups in a list of length <math>. (Compare this to elem's <math>.) This is Agda.Utils.List.hasElem.

  6. () :: (Foldable t, Eq α) => t α -> α -> Bool

    base-unicode-symbols Data.Foldable.Unicode

    (∋) = flip (∈) U+220B, CONTAINS AS MEMBER

  7. () :: (Foldable t, Eq α) => t α -> α -> Bool

    base-unicode-symbols Data.Foldable.Unicode

    (∌) = flip (∉) U+220C, DOES NOT CONTAIN AS MEMBER

  8. elem :: Eq a => a -> [a] -> Bool

    base GHC.List

    elem is the list membership predicate, usually written in infix form, e.g., x `elem` xs. For the result to be False, the list must be finite; True, however, results from an element equal to x found at a finite index of a finite or infinite list.

    >>> 3 `elem` []
    False
    
    >>> 3 `elem` [1,2]
    False
    
    >>> 3 `elem` [1,2,3,4,5]
    True
    
    >>> 3 `elem` [1..]
    True
    
    >>> 3 `elem` [4..]
    * Hangs forever *
    

  9. notElem :: Eq a => a -> [a] -> Bool

    base GHC.List

    notElem is the negation of elem.

    >>> 3 `notElem` []
    True
    
    >>> 3 `notElem` [1,2]
    True
    
    >>> 3 `notElem` [1,2,3,4,5]
    False
    
    >>> 3 `notElem` [1..]
    False
    
    >>> 3 `notElem` [4..]
    * Hangs forever *
    

  10. elem :: Eq a => a -> [a] -> Bool

    base GHC.OldList

    elem is the list membership predicate, usually written in infix form, e.g., x `elem` xs. For the result to be False, the list must be finite; True, however, results from an element equal to x found at a finite index of a finite or infinite list.

    >>> 3 `elem` []
    False
    
    >>> 3 `elem` [1,2]
    False
    
    >>> 3 `elem` [1,2,3,4,5]
    True
    
    >>> 3 `elem` [1..]
    True
    
    >>> 3 `elem` [4..]
    * Hangs forever *
    

Page 1 of many | Next