Creates a list from the given blocks. If you don't supply any arguments, this creates an empty list, which you can add elements to later.
Selects the item at the given index in the given list. The first list item is at index 1.
Inserts replacement
into the given list at position index
. The previous item at that position is removed.
Removes the item at the specified position from the list.
Inserts an item into a list at the specified position.
Returns the number of items in the list.
Adds the items in the second list to the end of the first list.
Adds the given items to the end of the list. The difference between this and append to list
is that append to list
takes the items to be appended as a single list, while add items to list
takes the items as individual arguments.
If thing
is one of the elements of the list
, returns true; otherwise, returns false. Note that if a list contains sublists, the members of the sublists are not themselves members of the list. For example, the members of the list (1 2 (3 4)) are 1, 2, and the list (3 4); 3 and 4 are not themselves members of the list.
Returns the position of thing in the list, or 0 if it's not in the list.
Picks an item at random from the list.
If list has no items, returns true; otherwise, returns false.
Makes a copy of a list, including copying all sublists.
If thing
is a list, returns true; otherwise, returns false.
Interprets the list as a row of a table and returns a CSV (comma-separated value) text representing the row. Each item in the row list is considered to be a field, and is quoted with double-quotes in the resulting CSV text. Items are separated by commas. The returned row text does not have a line separator at the end.
Interprets the list as a table in row-major format and returns a CSV (comma-separated value) text representing the table. Each item in the list should itself be a list representing a row of the CSV table. Each item in the row list is considered to be a field, and is quoted with double-quotes in the resulting CSV text. In the returned text, items in rows are separated by commas and rows are separated by CRLF (\r\n).
Parses a text as a CSV (comma-separated value) formatted row to produce a list of fields. It is an error for the row text to contain unescaped newlines inside fields (effectively, multiple lines). It is okay for the row text to end in a single newline or CRLF.
Parses a text as a CSV (comma-separated value) formatted table to produce a list of rows, each of which is a list of fields. Rows can be separated by newlines (\n) or CRLF (\r\n).
Looks up a given key in a list of (key, value) pairs and returns the associated value. Returns a specified default if there is not pair with that key. Each pair much be a list of exactly two items.