Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

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

  1. (!!) :: HasCallStack => [a] -> Int -> a

    ghc-lib-parser GHC.Prelude.Basic

    List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type. WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?. WARNING: This function takes linear time in the index.

    Examples

    >>> ['a', 'b', 'c'] !! 0
    'a'
    
    >>> ['a', 'b', 'c'] !! 2
    'c'
    
    >>> ['a', 'b', 'c'] !! 3
    *** Exception: Prelude.!!: index too large
    
    >>> ['a', 'b', 'c'] !! (-1)
    *** Exception: Prelude.!!: negative index
    

  2. (!!) :: Ord a => MaxQueue a -> Int -> a

    pqueue Data.PQueue.Max

    /. Returns the (k+1)th largest element of the queue.

  3. (!!) :: Ord a => MinQueue a -> Int -> a

    pqueue Data.PQueue.Min

    /. Index (subscript) operator, starting from 0. queue !! k returns the (k+1)th smallest element in the queue. Equivalent to toAscList queue !! k.

  4. (!!) :: [a] -> Int -> a

    prelude-compat Data.List2010

    No documentation available.

  5. (!!) :: [a] -> Int -> a

    prelude-compat Prelude2010

    No documentation available.

  6. (!!) :: (HasCallStack, Monad m) => Stream m a -> Int -> m a

    rebase Rebase.Data.Vector.Fusion.Stream.Monadic

    Element at the given position

  7. (!!) :: forall (n :: Nat) (as :: [Type]) . SNat n -> HVect as -> HVectIdx n as

    hvect Data.HVect

    No documentation available.

  8. (!!) :: CanBeInteger n => [a] -> n -> a

    mixed-types-num Numeric.MixedTypes.Literals

    No documentation available.

  9. (!!) :: HasCallStack => [a] -> Int -> a

    LambdaHack Game.LambdaHack.Core.Prelude

    List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type. WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?. WARNING: This function takes linear time in the index.

    Examples

    >>> ['a', 'b', 'c'] !! 0
    'a'
    
    >>> ['a', 'b', 'c'] !! 2
    'c'
    
    >>> ['a', 'b', 'c'] !! 3
    *** Exception: Prelude.!!: index too large
    
    >>> ['a', 'b', 'c'] !! (-1)
    *** Exception: Prelude.!!: negative index
    

  10. (!!) :: HasCallStack => [a] -> Int -> a

    LambdaHack Game.LambdaHack.Core.Prelude

    List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type. WARNING: This function is partial, and should only be used if you are sure that the indexing will not fail. Otherwise, use !?. WARNING: This function takes linear time in the index.

    Examples

    >>> ['a', 'b', 'c'] !! 0
    'a'
    
    >>> ['a', 'b', 'c'] !! 2
    'c'
    
    >>> ['a', 'b', 'c'] !! 3
    *** Exception: Prelude.!!: index too large
    
    >>> ['a', 'b', 'c'] !! (-1)
    *** Exception: Prelude.!!: negative index
    

Page 4 of many | Previous | Next