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.
(
!! ) :: HasCallStack => [a] -> Int -> aghc-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
(
!! ) :: Ord a => MaxQueue a -> Int -> apqueue Data.PQueue.Max /. Returns the (k+1)th largest element of the queue.
(
!! ) :: Ord a => MinQueue a -> Int -> apqueue 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.
-
prelude-compat Data.List2010 No documentation available.
-
prelude-compat Prelude2010 No documentation available.
(
!! ) :: (HasCallStack, Monad m) => Stream m a -> Int -> m arebase Rebase.Data.Vector.Fusion.Stream.Monadic Element at the given position
(
!! ) :: forall (n :: Nat) (as :: [Type]) . SNat n -> HVect as -> HVectIdx n ashvect Data.HVect No documentation available.
(
!! ) :: CanBeInteger n => [a] -> n -> amixed-types-num Numeric.MixedTypes.Literals No documentation available.
(
!! ) :: HasCallStack => [a] -> Int -> aLambdaHack 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
(
!! ) :: HasCallStack => [a] -> Int -> aLambdaHack 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