Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module reexports most of the definitions from the "base" package, which are meant to be imported unqualified.
For details check out the source.
Reimplementations of functions presented in versions of "base" newer than 4.6
Data.Bool
bool :: a -> a -> Bool -> a Source
Case analysis for the Bool
type.
bool a b p
evaluates to a
when p
is False
, and evaluates to b
when p
is True
.
Data.Functor
Data.List
isSubsequenceOf :: Eq a => [a] -> [a] -> Bool Source
The isSubsequenceOf
function takes two lists and returns True
if the
first list is a subsequence of the second list.
is equivalent to isSubsequenceOf
x y
.elem
x (subsequences
y)
Examples
>>>
isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True>>>
isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True>>>
isSubsequenceOf [1..10] [10,9..0]
False
Debug.Trace
traceShowId :: Show a => a -> a Source
Like traceShow
but returns the shown value instead of a third value.