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.

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

    xmonad-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
    

  2. (!!*) :: (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)
    

  3. (!!/) :: (Functor m, Functor r, Fractional a) => m (r a) -> a -> m (r a)

    linear Linear.Matrix

    Matrix-scalar division

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

    relude 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"
    

  5. data (a6989586621681141368 :: NonEmpty a) !!@#@$$ (b :: TyFun Natural a)

    singletons-base Data.List.NonEmpty.Singletons

    No documentation available.

  6. type family (a6989586621681141368 :: NonEmpty a) !!@#@$$$ (a6989586621681141369 :: Natural) :: a

    singletons-base Data.List.NonEmpty.Singletons

    No documentation available.

  7. data (a6989586621679826768 :: [a]) !!@#@$$ (b :: TyFun Natural a)

    singletons-base Data.List.Singletons

    No documentation available.

  8. type family (a6989586621679826768 :: [a]) !!@#@$$$ (a6989586621679826769 :: Natural) :: a

    singletons-base Data.List.Singletons

    No documentation available.

  9. data (a6989586621679826768 :: [a]) !!@#@$$ (b :: TyFun Natural a)

    singletons-base Prelude.Singletons

    No documentation available.

  10. type family (a6989586621679826768 :: [a]) !!@#@$$$ (a6989586621679826769 :: Natural) :: a

    singletons-base Prelude.Singletons

    No documentation available.

Page 8 of many | Previous | Next