:: [a] -> [a] -> Bool

True if length xs == length ys
True if length xs <= length ys
True if length xs < length ys
Check whether two lists with different element types have equal length. It holds
\(Shape xs) (List ys) -> equalLength xs ys == (length xs == length ys)
but equalLength is more efficient.
lessOrEqualLength x y is almost the same as compareLength x y <= EQ, but
>>> lessOrEqualLength "" undefined
True
whereas compareLength [] undefined <= EQ = undefined.
The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.
>>> "Hello" `isPrefixOf` "Hello World!"
True

>>> "Hello" `isPrefixOf` "Wello Horld!"
False
For the result to be True, the first list must be finite; False, however, results from any mismatch:
>>> [0..] `isPrefixOf` [1..]
False

>>> [0..] `isPrefixOf` [0..99]
False

>>> [0..99] `isPrefixOf` [0..]
True

>>> [0..] `isPrefixOf` [0..]
* Hangs forever *
The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second.
>>> "ld!" `isSuffixOf` "Hello World!"
True

>>> "World" `isSuffixOf` "Hello World!"
False
The second list must be finite; however the first list may be infinite:
>>> [0..] `isSuffixOf` [0..99]
False

>>> [0..99] `isSuffixOf` [0..]
* Hangs forever *
The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.
>>> isInfixOf "Haskell" "I really like Haskell."
True

>>> isInfixOf "Ial" "I really like Haskell."
False
For the result to be True, the first list must be finite; for the result to be False, the second list must be finite:
>>> [20..50] `isInfixOf` [0..]
True

>>> [0..] `isInfixOf` [20..50]
False

>>> [0..] `isInfixOf` [0..]
* Hangs forever *
The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively. isSubsequenceOf x y is equivalent to elem x (subsequences y).
>>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True

>>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True

>>> isSubsequenceOf [1..10] [10,9..0]
False
For the result to be True, the first list must be finite; for the result to be False, the second list must be finite:
>>> [0,2..10] `isSubsequenceOf` [0..]
True

>>> [0..] `isSubsequenceOf` [0,2..10]
False

>>> [0,2..] `isSubsequenceOf` [0..]
* Hangs forever*
The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.
>>> isInfixOf "Haskell" "I really like Haskell."
True
>>> isInfixOf "Ial" "I really like Haskell."
False
Are two lists disjoint, with no elements in common.
disjoint [1,2,3] [4,5] == True
disjoint [1,2,3] [4,1] == False
Returns true if the given list starts with the specified elements; false otherwise. (This is an alias for isPrefixOf.) Example:
startswith "He" "Hello" -> True
Returns true if the given list ends with the specified elements; false otherwise. (This is an alias for isSuffixOf.) Example:
endswith "lo" "Hello" -> True
Returns true if the given parameter is a sublist of the given list; false otherwise. Alias for isInfixOf. Example:
contains "Haskell" "I really like Haskell." -> True
contains "Haskell" "OCaml is great." -> False
Returns true if the given list contains any of the elements in the search list.
The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second. The second list must be finite.
>>> "ld!" `isSuffixOf` "Hello World!"
True
>>> "World" `isSuffixOf` "Hello World!"
False
The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.
>>> "Hello" `isPrefixOf` "Hello World!"
True
>>> "Hello" `isPrefixOf` "Wello Horld!"
False
The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively. isSubsequenceOf x y is equivalent to 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
Sublist relation.
Check if all elements of a list is contained in another list