psil

list

This is the documentation for the list module.


is-list?

is-list? (boolean) checks if the given rand is a list.

Parameters:


list

list (list) creates a list from the given rands.

Parameters:


list-append

list-append (list) returns a list with given rands appended.

Parameters:


list-count

list-count (natural number) returns the number of items in a list equal to the given rands.

Parameters:


list-each

list-each (#void) applies the value to the given procedure. Effectively the same as list-map, but ignores return values.

Parameters:


list-empty?

list-empty? (boolean) returns true if the list is empty.

Parameters:


list-filter

list-filter (list) filters the list down using the given procedure.

Parameters:


list-find

list-find (integer) returns the first index where the given value was found, or -1 if the value was not found.

Parameters:


list-first

list-first (any) returns the first value of the given list.

Parameters:


list-flatten

list-flatten (list) returns a flatten list. That is, each list inside the list is expanded in the new list produced, being replaced by its elements.

Parameters:


list-fold

list-fold (any) combines all elements of a list into one cumulative value, given a procedure and a base value. With each iteration, the procedure is passed firstly the accumulator, then a value from the list.

Parameters:


list-foldr

list-foldr (any) is similar to list-fold, except the procedure is passed firstly a value from the list, and then the accumulator.

Parameters:


list-get

list-get (any) gets an element from the list at a specific index.

Parameters:


list-join

list-join (list) combines two (or more) lists into one.

Parameters:


list-len

list-len (natural number) returns the length of a given list.

Parameters:


list-map

list-map (list) returns a new list with values transformed by the given procedure.

Parameters:


list-range

list-range (list) creates a list of numbers from a given range, with an optional step-size.

Parameters:


list-remove

list-remove (list) removes an element from the list at a specific index.

Parameters:


list-reverse

list-reverse (list) returns a reversed list.

Parameters:


list-second

list-second (any) returns the second value of the given list.

Parameters:


list-swap

list-swap (list) swaps two elements in the list.

Parameters:


list-third

list-third (any) returns the third value of the given list.

Parameters: