Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
!! ) :: Monad m => SerialT m a -> Int -> m (Maybe a)streamly Streamly.Internal.Data.Stream.IsStream Lookup the element at the given index.
(
!! ) :: Monad m => SerialT m a -> Int -> m (Maybe a)streamly Streamly.Prelude Lookup the element at the given index.
-
streams Data.Stream.Infinite xs !! n returns the element of the stream xs at index n. Note that the head of the stream has index 0. Beware: passing a negative integer as the first argument will cause an error.
(
!! ) :: Zipper a -> Integer -> astreams Data.Stream.Infinite.Functional.Zipper xs !! n returns the element of the stream xs at index n. Note that the head of the stream has index 0.
(
!! ) :: Stream a -> Integer -> astreams Data.Stream.Infinite.Skew O(log n).
(
!! ) :: HasCallStack => [a] -> Int -> aconstrained-categories Control.Category.Constrained.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 -> aconstrained-categories Control.Category.Hask 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
-
copilot-language Copilot.Language.Operators.Array Pair a stream with an element accessor, without applying it to obtain the value of the element. This function is needed to refer to an element accessor when the goal is to update the element value, not just to read it.
(
!! ) :: (MonadThrow m, Integral n) => [a] -> n -> m alistsafe Data.List.Safe List index (subscript) operator, starting from 0. Indices larger than length xs - 1 throw an EmptyListException, negative indices throw an NegativeIndexException.
(
!! ) :: HasCallStack => [a] -> Int -> axmonad-contrib XMonad.Config.Prime 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