Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- uncons ∷ [a] → Maybe (a, [a])
- null ∷ [a] → Bool
- map ∷ ∀ a b. (a → b) → [a] → [b]
- and ∷ [Bool] → Bool
- or ∷ [Bool] → Bool
- any ∷ ∀ a. (a → Bool) → [a] → Bool
- all ∷ ∀ a. (a → Bool) → [a] → Bool
- elem ∷ Eq a ⇒ a → [a] → Bool
- notElem ∷ Eq a ⇒ a → [a] → Bool
- find ∷ ∀ a. (a → Bool) → [a] → Maybe a
- filter ∷ (a → Bool) → [a] → [a]
- listToMaybe ∷ [a] → Maybe a
- uniqueElement ∷ [a] → Maybe a
- findIndices ∷ (a → Bool) → [a] → [Integer]
- findIndex ∷ (a → Bool) → [a] → Maybe Integer
- foldr ∷ ∀ a b. (a → b → b) → b → [a] → b
- foldl ∷ ∀ a b. (b → a → b) → b → [a] → b
- revAppend ∷ ∀ a. [a] → [a] → [a]
- reverse ∷ [a] → [a]
- concat ∷ [[a]] → [a]
- concatMap ∷ (a → [b]) → [a] → [b]
- zip ∷ [a] → [b] → [(a, b)]
- unzip ∷ [(a, b)] → ([a], [b])
- (++) ∷ [a] → [a] → [a]
- (!!) ∷ ∀ a. [a] → Integer → a
- indexBuiltinList ∷ ∀ a. BuiltinList a → Integer → a
- head ∷ [a] → a
- last ∷ [a] → a
- tail ∷ [a] → [a]
- take ∷ Integer → [a] → [a]
- drop ∷ Integer → [a] → [a]
- splitAt ∷ Integer → [a] → ([a], [a])
- nub ∷ Eq a ⇒ [a] → [a]
- nubBy ∷ (a → a → Bool) → [a] → [a]
- zipWith ∷ ∀ a b c. (a → b → c) → [a] → [b] → [c]
- dropWhile ∷ ∀ a. (a → Bool) → [a] → [a]
- replicate ∷ ∀ a. Integer → a → [a]
- partition ∷ (a → Bool) → [a] → ([a], [a])
- sort ∷ Ord a ⇒ [a] → [a]
- sortBy ∷ (a → a → Ordering) → [a] → [a]
Documentation
map ∷ ∀ a b. (a → b) → [a] → [b] Source #
Plutus Tx version of map
.
>>>
map (\i -> i + 1) [1, 2, 3]
[2,3,4]
any ∷ ∀ a. (a → Bool) → [a] → Bool Source #
Determines whether any element of the structure satisfies the predicate.
all ∷ ∀ a. (a → Bool) → [a] → Bool Source #
Determines whether all elements of the list satisfy the predicate.
find ∷ ∀ a. (a → Bool) → [a] → Maybe a Source #
Returns the leftmost element matching the predicate, or Nothing
if there's no such element.
filter ∷ (a → Bool) → [a] → [a] Source #
Plutus Tx version of filter
.
>>>
filter (> 1) [1, 2, 3, 4]
[2,3,4]
listToMaybe ∷ [a] → Maybe a Source #
Plutus Tx version of listToMaybe
.
uniqueElement ∷ [a] → Maybe a Source #
Return the element in the list, if there is precisely one.
findIndices ∷ (a → Bool) → [a] → [Integer] Source #
Plutus Tx version of findIndices
.
foldr ∷ ∀ a b. (a → b → b) → b → [a] → b Source #
Plutus Tx version of foldr
.
>>>
foldr (\i s -> s + i) 0 [1, 2, 3, 4]
10
foldl ∷ ∀ a b. (b → a → b) → b → [a] → b Source #
Plutus Tx velsion of foldl
.
>>>
foldl (\s i -> s + i) 0 [1, 2, 3, 4]
10
revAppend ∷ ∀ a. [a] → [a] → [a] Source #
Cons each element of the first list to the second one in reverse order (i.e. the last element of the first list is the head of the result).
revAppend xs ys === reverse xs ++ ys
>>>
revAppend "abc" "de"
"cbade"
Plutus Tx version of concat
.
>>>
concat [[1, 2], [3], [4, 5]]
[1,2,3,4,5]
(++) ∷ [a] → [a] → [a] infixr 5 Source #
Plutus Tx version of (++)
.
>>>
[0, 1, 2] ++ [1, 2, 3, 4]
[0,1,2,1,2,3,4]
indexBuiltinList ∷ ∀ a. BuiltinList a → Integer → a Source #
Index operator for builtin lists.
>>>
indexBuiltinList (toBuiltin [10, 11, 12]) 2
12