List functions
The luego.list package contains utility functions to work with lists.
luego.list
append
Return a new list with an element appended, i.e. added at the end
arrayFill
Returns a array of the specified size filled with passed value (Boolean, Int, Long or Double)
arrayFill2
Returns a 2D array of the specified size filled with passed value (Boolean, Int, Long or Double)
arrayFill3
arrayFill3(numLines: Integer, numCols: Integer, numZ: Integer, x: X) => NonEmptyList[NonEmptyList[X]]
Returns a 3D array of the specified size filled with passed value (Boolean, Int, Long or Double)
concatList
Concatenate two lists
distinct
Selects all the elements of this list ignoring the duplicates.
headTail
Decompose a non empty list into a head and a tail.
headTailOption
Decompose a list into an head and a tail, wrapped in an option.
headTailUnsafe
Decompose a list into an head and a tail. It will fail and raise an exception if the list is empty.
nonEmptyListOption
Return a list wrapped in a Some if it is not empty, otherwise return None.
prepend
Return a new list with the element e prepended, i.e. added at the beginning
reverse
Returns a new list with the elements in reversed order.
tail
Returns the tail of the non empty collection.
zip
Returns a list formed from two lists by combining corresponding elements in pairs.
zipNEL
Returns a non empty list formed from two non empty lists by combining corresponding elements in pairs.