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. reverse :: forall ty (n :: Nat) . PrimType ty => BlockN n ty -> BlockN n ty

    basement Basement.Sized.Block

    No documentation available.

  2. reverse :: forall (n :: Nat) a . ListN n a -> ListN n a

    basement Basement.Sized.List

    Reverse a list

  3. reverse :: forall ty (n :: Nat) . PrimType ty => UVect n ty -> UVect n ty

    basement Basement.Sized.UVect

    No documentation available.

  4. reverse :: forall (n :: Nat) ty . Vect n ty -> Vect n ty

    basement Basement.Sized.Vect

    No documentation available.

  5. reverse :: String -> String

    basement Basement.String

    Reverse a string

  6. reverse :: PrimType ty => UArray ty -> UArray ty

    basement Basement.UArray

    No documentation available.

  7. reverse :: Chunks -> Chunks

    byteslice Data.Bytes.Chunks

    Reverse chunks but not the bytes within each chunk.

  8. reverse :: forall (n :: Natural) r ix e . (IsIndexDimension ix n, Index ix, Source r e) => Dimension n -> Array r ix e -> Array D ix e

    massiv Data.Massiv.Array

    Reverse an array along some dimension. Dimension supplied is checked at compile time.

    Example

    >>> import Data.Massiv.Array as A
    
    >>> arr = makeArrayLinear Seq (Sz2 4 5) (+10) :: Array D Ix2 Int
    
    >>> arr
    Array D Seq (Sz (4 :. 5))
    [ [ 10, 11, 12, 13, 14 ]
    , [ 15, 16, 17, 18, 19 ]
    , [ 20, 21, 22, 23, 24 ]
    , [ 25, 26, 27, 28, 29 ]
    ]
    
    >>> A.reverse Dim1 arr
    Array D Seq (Sz (4 :. 5))
    [ [ 14, 13, 12, 11, 10 ]
    , [ 19, 18, 17, 16, 15 ]
    , [ 24, 23, 22, 21, 20 ]
    , [ 29, 28, 27, 26, 25 ]
    ]
    
    >>> A.reverse Dim2 arr
    Array D Seq (Sz (4 :. 5))
    [ [ 25, 26, 27, 28, 29 ]
    , [ 20, 21, 22, 23, 24 ]
    , [ 15, 16, 17, 18, 19 ]
    , [ 10, 11, 12, 13, 14 ]
    ]
    

  9. reverse :: [a] -> [a]

    protolude Protolude

    reverse xs returns the elements of xs in reverse order. xs must be finite.

    Laziness

    reverse is lazy in its elements.
    >>> head (reverse [undefined, 1])
    1
    
    >>> reverse (1 : 2 : undefined)
    *** Exception: Prelude.undefined
    

    Examples

    >>> reverse []
    []
    
    >>> reverse [42]
    [42]
    
    >>> reverse [2,5,7]
    [7,5,2]
    
    >>> reverse [1..]
    * Hangs forever *
    

  10. reverse :: [a] -> [a]

    ghc-internal GHC.Internal.Data.List

    reverse xs returns the elements of xs in reverse order. xs must be finite.

    Laziness

    reverse is lazy in its elements.
    >>> head (reverse [undefined, 1])
    1
    
    >>> reverse (1 : 2 : undefined)
    *** Exception: Prelude.undefined
    

    Examples

    >>> reverse []
    []
    
    >>> reverse [42]
    [42]
    
    >>> reverse [2,5,7]
    [7,5,2]
    
    >>> reverse [1..]
    * Hangs forever *
    

Page 7 of many | Previous | Next