Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- uncons :: [a] -> Maybe (a, [a])
- null :: [a] -> Bool
- map :: forall a b. (a -> b) -> [a] -> [b]
- and :: [Bool] -> Bool
- or :: [Bool] -> Bool
- any :: forall a. (a -> Bool) -> [a] -> Bool
- all :: forall a. (a -> Bool) -> [a] -> Bool
- elem :: Eq a => a -> [a] -> Bool
- notElem :: Eq a => a -> [a] -> Bool
- find :: forall 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 :: forall a b. (a -> b -> b) -> b -> [a] -> b
- foldl :: forall a b. (b -> a -> b) -> b -> [a] -> b
- revAppend :: forall 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]
- (!!) :: forall a. [a] -> Integer -> a
- indexBuiltinList :: forall 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 :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
- dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
- replicate :: forall a. Integer -> a -> [a]
- partition :: (a -> Bool) -> [a] -> ([a], [a])
- sort :: Ord a => [a] -> [a]
- sortBy :: (a -> a -> Ordering) -> [a] -> [a]
Documentation
map :: forall a b. (a -> b) -> [a] -> [b] Source #
Plutus Tx version of map
.
>>>
map (\i -> i + 1) [1, 2, 3]
[2,3,4]
any :: forall a. (a -> Bool) -> [a] -> Bool Source #
Determines whether any element of the structure satisfies the predicate.
all :: forall a. (a -> Bool) -> [a] -> Bool Source #
Determines whether all elements of the list satisfy the predicate.
find :: forall 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 :: forall 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 :: forall 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 :: forall 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"
concat :: [[a]] -> [a] Source #
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]
(!!) :: forall a. [a] -> Integer -> a infixl 9 Source #
Plutus Tx version of (!!)
.
>>>
[10, 11, 12] !! 2
12
indexBuiltinList :: forall a. BuiltinList a -> Integer -> a Source #
Index operator for builtin lists.
>>>
indexBuiltinList (toBuiltin [10, 11, 12]) 2
12