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.
reverse :: forall ty (n :: Nat) . PrimType ty => BlockN n ty -> BlockN n tybasement Basement.Sized.Block No documentation available.
reverse :: forall (n :: Nat) a . ListN n a -> ListN n abasement Basement.Sized.List Reverse a list
reverse :: forall ty (n :: Nat) . PrimType ty => UVect n ty -> UVect n tybasement Basement.Sized.UVect No documentation available.
reverse :: forall (n :: Nat) ty . Vect n ty -> Vect n tybasement Basement.Sized.Vect No documentation available.
-
basement Basement.String Reverse a string
reverse :: PrimType ty => UArray ty -> UArray tybasement Basement.UArray No documentation available.
-
byteslice Data.Bytes.Chunks Reverse chunks but not the bytes within each chunk.
-
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 ] ]
-
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 *
-
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 *