• List Blocks

    • Create empty list
    • Create an empty list without elements.
    • Make a list
    • Create a list of the given blocks. If you do not provide any arguments, this block creates an empty list, to which you can add elements later.
    • This block is a mutator. By clicking on the blue plus sign, you can add additional items to your list.
    • Add items to list
    • Add the elements given at the end of the list. The difference between this and append to the list is that adding to the list takes the elements that will be appended as a list, while adding elements to the list takes the elements as individual arguments. This block is a mutator, like the previous one, you can add more elements.
    • Is in list?
    • If the argument entered is one of the items in the list, it returns true. Otherwise, it returns false. Note that if a list contains sublists, members of the sublists are not 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 members of the list, so you will not find them.
    • Length of list
    • Returns an integer with the number of elements in the list.
    • Is list empty?
    • If the list has no elements, it returns true. Otherwise, it returns false.
    • Pick a random item
    • Select a random item from the list.
    • Index in list
    • Returns the position of the element in the list. If it is not in the list, it returns 0.
    • Select list item
    • Select the element in the index given in the given list. The first item in the list is in index 1.
    • Insert list item
    • Insert an item in the list at the given position.
    • Replace list item
    • Insert the replacement in the given list, in the index of the position. The previous element in that position is permanently deleted.
    • Remove list item
    • Remove the element in the given position.
    • Append to list
    • Appends the elements in the second list to the end of the first list.
    • Copy list
    • Makes a copy of a list, including a copy of all sublists.
    • Is a list?
    • If the argument is a list, it returns true. Otherwise, it returns false.
    • List to csv row
    • 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. For example, converting the list (abcd) to a CSV row produces ("a","b", "c", "d"). The returned row text does not have a line separator at the end.
    • List to csv table
    • 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).
    • List from csv row
    • Parses a text as a CSV (comma-separated value) formatted row to produce a list of fields. For example, converting ("a", "b", "c", "d") to a list produces (abcd).
    • List from csv table
    • 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).
    • Lookup in pairs
    • Used for looking up information in a dictionary-like structure represented as a list. This operation takes three inputs:
      • - A key.
      • - A list pairs.
      • - A notFound result, which by default, is set to "not found".

      Here pairs must be a list of pairs, that is, a list where each element is itself a list of two elements. Lookup in pairs finds the first pair in the list whose first element is the key, and returns the second element.
      For example, if the list is:
      • - (a apple)
      • - (d dragon)
      • - (b boxcar)
      • - (cat 100)
      Then looking up 'b' will return 'boxcar'. If there is no such pair in the list, then the_lookup in pairs_will return the 'NOTFOUND' result. If pairs is not a list of pairs, then the operation will signal an error.