plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe Haskell None
Language Haskell2010

PlutusTx.List

Synopsis

Documentation

map :: (a -> b) -> [a] -> [b] Source #

Plutus Tx version of map .

>>> map (\i -> i + 1) [1, 2, 3]
[2,3,4]

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 .

findIndex :: (a -> Bool ) -> [a] -> Maybe Integer Source #

Plutus Tx version of findIndex .

foldr :: (a -> b -> b) -> b -> [a] -> b Source #

Plutus Tx version of foldr .

>>> foldr (\i s -> s + i) 0 [1, 2, 3, 4]
10

reverse :: [a] -> [a] Source #

Plutus Tx version of reverse .

zip :: [a] -> [b] -> [(a, b)] Source #

Plutus Tx version of zip .

(++) :: [a] -> [a] -> [a] infixr 5 Source #

Plutus Tx version of (++) .

>>> [0, 1, 2] ++ [1, 2, 3, 4]
[0,1,2,1,2,3,4]

(!!) :: [a] -> Integer -> a infixl 9 Source #

Plutus Tx version of (!!) .

>>> [10, 11, 12] !! 2
12

head :: [a] -> a Source #

Plutus Tx version of head .

take :: Integer -> [a] -> [a] Source #

Plutus Tx version of take .

tail :: [a] -> [a] Source #

Plutus Tx version of tail .

nub :: Eq a => [a] -> [a] Source #

Plutus Tx version of nub .

nubBy :: (a -> a -> Bool ) -> [a] -> [a] Source #

Plutus Tx version of nubBy .

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] Source #

Plutus Tx version of zipWith .

dropWhile :: (a -> Bool ) -> [a] -> [a] Source #

Plutus Tx version of dropWhile .

partition :: (a -> Bool ) -> [a] -> ([a], [a]) Source #

Plutus Tx version of partition .

sort :: Ord a => [a] -> [a] Source #

Plutus Tx version of sort .

sortBy :: (a -> a -> Ordering ) -> [a] -> [a] Source #

Plutus Tx version of sortBy .