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.
(
!! ) :: HasCallStack => [a] -> Int -> axmonad-contrib XMonad.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
(
!!* ) :: (Functor m, Functor r, Num a) => m (r a) -> a -> m (r a)linear Linear.Matrix Matrix-scalar product
>>> V2 (V2 1 2) (V2 3 4) !!* 5 V2 (V2 5 10) (V2 15 20)
(
!!/ ) :: (Functor m, Functor r, Fractional a) => m (r a) -> a -> m (r a)linear Linear.Matrix Matrix-scalar division
(
!!? ) :: [a] -> Int -> Maybe arelude Relude.List Safer version of !!, returns a Maybe. Get element from list using index value starting from `0`.
>>> [] !!? 0 Nothing
>>> ["a", "b", "c"] !!? 3 Nothing
>>> [1, 2, 3] !!? (-1) Nothing
>>> ["a", "b", "c"] !!? 2 Just "c"
data (a6989586621681141368 :: NonEmpty a)
!!@#@$$ (b :: TyFun Natural a)singletons-base Data.List.NonEmpty.Singletons No documentation available.
type family (a6989586621681141368 :: NonEmpty a)
!!@#@$$$ (a6989586621681141369 :: Natural) :: asingletons-base Data.List.NonEmpty.Singletons No documentation available.
data (a6989586621679826768 :: [a])
!!@#@$$ (b :: TyFun Natural a)singletons-base Data.List.Singletons No documentation available.
type family (a6989586621679826768 :: [a])
!!@#@$$$ (a6989586621679826769 :: Natural) :: asingletons-base Data.List.Singletons No documentation available.
data (a6989586621679826768 :: [a])
!!@#@$$ (b :: TyFun Natural a)singletons-base Prelude.Singletons No documentation available.
type family (a6989586621679826768 :: [a])
!!@#@$$$ (a6989586621679826769 :: Natural) :: asingletons-base Prelude.Singletons No documentation available.