-
Notifications
You must be signed in to change notification settings - Fork 0
Lists
Lists are a very powerful kind of variable and can store any type of data. Creating a list is easy:
set myList to list()Creating a new list with elements is easy as well:
set myFruits to list("Apple", "Orange", "Banana")If you add an element to a list, it will be appended at the end of the list:
set myFruits to listAdd(myFruits, "Cherry")As you can see, all list functions are returning copies, so you have to store the result.
Returns a new list containing the given elements. Please note that list() does not support named parameters.
Returns the size of the given list.
Adds the given element to a copy of the given list and returns the copy.
Returns the element at the given index.
Returns the elements in the given range.
Sets an element at the given index to a copy of the given list and returns the copy.
Removes the element at the given index in a copy of the given list and returns the copy.
Reverses the elements in the list.
Creates a copy of the given list expanded with the expander and returns the copy.