Reference

List

Constructor
Input A list of elements separated by comma.
Output A list containing all the elements.

Signature

Example

Indexing
Input A list and a number representing the index.
Output The element at the specified index in the list.

Signature

Example

At
Input A list and a number representing the index.
Output The element at the specified index in the list.

Signature

Example

Sublist
Input A list and two numbers representing the start and end indices.
Output A new list from the start index to the end index.

Signature

Example

Set
Input A list, a number, and any value.
Output A new list with the value set at the specified index.

Signature

Example

Join
Input A list and a string.
Output A string that is the result of concatenating the list elements, separated by the specified string.

Signature

Example

Length
Input A list.
Output The number of elements in the list.

Signature

Example

Concatenation
Input Two lists.
Output A new list that is the result of concatenating the two lists.

Signature

Example

Is empty
Input A list.
Output True if the list is empty. False otherwise.

Signature

Example

Is not empty
Input A list.
Output True if the list is not empty. False otherwise.

Signature

Example

Contains
Input A list and any value.
Output True if the list contains the specified value. False otherwise.

Signature

Example

First
Input A list.
Output The first element of the list.

Signature

Example

Last
Input A list.
Output The last element of the list.

Signature

Example

Init
Input A list.
Output A new list containing all elements except the last one.

Signature

Example

Rest
Input A list.
Output A new list containing all elements except the first one.

Signature

Example

Take
Input A list and a number.
Output A new list containing the first n elements of the input list, where n is the specified number.

Signature

Example

Drop
Input A list and a number.
Output A new list containing all elements except the first n elements, where n is the specified number.

Signature

Example

Insert start
Input A list and any value.
Output A new list with the value inserted at the start.

Signature

Example

Insert end
Input A list and any value.
Output A new list with the value inserted at the end.

Signature

Example

Remove
Input A list and any value.
Output A new list with all the occurrences of the value removed.

Signature

Example

Remove at
Input A list and a number.
Output A new list with the element at the specified index removed.

Signature

Example

Reverse
Input A list.
Output A new list with the elements in reverse order.

Signature

Example

Filled
Input A number and any value.
Output A list filled with the specified value, repeated the specified number of times.

Signature

Example

Index of
Input A list and any value.
Output The index of the first occurrence of the value in the list, or -1 if the value is not found.

Signature

Example

Swap
Input A list and two numbers.
Output A new list with the elements at the specified indices swapped.

Signature

Example

Map
Input A list and a function that takes an element of the list as input and returns a new value.
Output A new list with the function applied to each element of the input list.

Signature

Example

Filter
Input A list and a function that takes an element of the list as input and returns a boolean.
Output A new list containing only the elements of the input list for which the function returns true.

Signature

Example

Reduce
Input A list, an initial value, and a function that takes the current value and an element of the list as input and returns a new value.
Output The result of applying the function to each element of the list, starting with the initial value.

Signature

Example

All
Input A list and a function that takes an element of the list as input and returns a boolean.
Output True if the function returns true for all elements of the list. False otherwise.

Signature

Example

None
Input A list and a function that takes an element of the list as input and returns a boolean.
Output True if the function returns false for all elements of the list. False otherwise.

Signature

Example

Any
Input A list and a function that takes an element of the list as input and returns a boolean.
Output True if the function returns true for at least one element of the list. False otherwise.

Signature

Example

Zip
Input Two lists and a function that takes an element from each list as input and returns a new value.
Output A new list with the function applied to each pair of elements from the input lists.

Signature

Example

Sort
Input A list and a function that takes two elements of the list as input and compares them.
Output A new list with the elements sorted according to the function.

Signature

Example