Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
!! ) :: Monad m => StreamK m a -> Int -> m (Maybe a)streamly-core Streamly.Internal.Data.StreamK No documentation available.
(
!! ) :: (HasCallStack, Monad m) => Stream m a -> Int -> m avector-stream Data.Stream.Monadic Element at the given position
(
!! ) :: HasCallStack => [a] -> Int -> aAgda Agda.Utils.List A variant of !! that might provide more informative error messages if the index is out of bounds. Precondition: The index should not be out of bounds.
(
!! ) :: HasCallStack => NonEmpty a -> Int -> aAgda Agda.Utils.List1 xs !! n returns the element of the stream xs at index n. Note that the head of the stream has index 0. Beware: a negative or out-of-bounds index will cause an error.
-
control-dsl Control.Dsl.Cont A type alias to Cont for a deeply nested delimited continuation.
Examples
>>> :set -XTypeOperators >>> :set -XRebindableSyntax >>> import Prelude hiding ((>>), (>>=), return, fail) >>> import Control.Dsl >>> import Control.Dsl.Yield >>> import Control.Dsl.Empty >>> import Control.Dsl.Monadic
>>> :{ f :: IO () !! [Integer] !! [String] !! [Double] f = do Yield "foo" Yield 0.5 Yield "bar" Yield 42 Yield "baz" return ([] :: [Double]) :}>>> :{ f >>= (\d -> do { Monadic $ putStrLn $ "double list: " ++ show d ; return ([] :: [String]) }) >>= (\s -> do { Monadic $ putStrLn $ "string list: " ++ show s ; return ([] :: [Integer]) }) >>= (\i -> do { Monadic $ putStrLn $ "integer list: " ++ show i ; return () }) :} double list: [0.5] string list: ["foo","bar","baz"] integer list: [42] (
!! ) :: HasCallStack => [a] -> Int -> adimensional Numeric.Units.Dimensional.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 -> adistribution-opensuse OpenSuse.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 -> afaktory Faktory.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 -> ahledger-web Hledger.Web.Import 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
-
sized Data.Sized (Unsafe) indexing with Ints. If you want to check boundary statically, use %!! or sIndex. Since 0.7.0.0