seq Module

all?

quot1 quot2 bool

Applies predicate quot2 to each element of quot1 and returns true if all elements of quot1 satisfy predicate quot2, false otherwise.

any?

quot1 quot2 bool

Applies predicate quot2 to each element of quot1 and returns true if at least one element of quot1 satisfies predicate quot2, false otherwise.

append

a quot (a* a)

Returns a new quotation containing the contents of quot with a appended.

get

quot int a

Returns the nth element of quot (zero-based).

concat

quot1 quot2 quot3

Concatenates quot1 with quot2.

difference

quot1 quot2 quot3

Calculates the difference quot3 of quot1 and quot2.

drop

quot1 int quot2

Returns a quotation quot2 containing the remaining elements after the first n values of the input quotation quot1, or an empty quotation if int is greater than the length of quot1.

filter

quot1 quot2 quot3

Returns a new quotation quot3 containing all elements of quot1 that satisfy predicate quot2.

find

quot1 quot2 int

Returns the index of the first element within quot1 that satisfies predicate quot2, or -1 if no element satisfies it.

first

quot a

Returns the first element of quot.

flatten

quot1 quot2

Flattens all quotations within quot1 and returns the resulting sequence quot2.

harvest

quot1 quot2

Creates a new quotation quot2 containing all elements of quot1 except for empty quotations.

in?

quot a bool

Returns true if a is contained in quot, false otherwise.

insert

quot1 a int quot2

Inserts a as the value of the nth element quot1 (zero-based), and returns the modified copy of the quotation quot2.

intersection

quot1 quot2 quot3

Calculates the intersection quot3 of quot1 and quot2.

last

quot a

Returns the last element of quot.

map

quot1 quot2 quot3

Returns a new quotation quot3 obtained by applying quot2 to each element of quot1.

map-reduce

quot1 quot2 quot3 int

Applies quot2 (map) to each element of quot1 and then applies quot3 (reduce) to each successive element of quot1. quot1 must have at least one element.

partition

quot1 quot2 quot3 quot4

Partitions quot1 into two quotations: quot3 contains all elements of quot1 that satisfy predicate quot2, quot4 all the others.

one?

quot1 quot2 bool

Applies predicate quot2 to each element of quot1 and returns true if only one element of quot1 satisfies predicate quot2, false otherwise.

prepend

a quot (a a*)

Returns a new quotation containing the contents of quot with a prepended.

quote-map

quot1 quot2

Returns a new quotation quot2 obtained by quoting each element of quot1.

raw-get

quot int dict:rawval

Returns the nth element of quot (zero-based) wrapped in a dict:rawval.

reduce

quot1 a1 quot2 a2

Combines each successive element of quot1 using quot2. On the first iteration, the first two inputs processed by quot2 are a1 and the first element of quot1.

reject

quot1 quot2 quot3

Returns a new quotatios quot3 including all elements of quot1 that do not satisfy predicate quot2 (i.e. the opposite of filter)

remove

quot1 int quot2

Returns the nth element of quot1 (zero-based), and returns the modified copy of the quotation quot2.

rest

quot1 quot2

Returns a new quotation quot2 containing all elements of quot1 quotation except for the first.

reverse

quot1 quot2

Returns a new quotation quot2 containing all elements of quot1 in reverse order.

set

quot1 a int quot2

Sets the value of the nth element quot1 (zero-based) to a, and returns the modified copy of the quotation quot2.

set-sym

quot1 'sym int quot2

Sets the value of the nth element quot1 (zero-based) to 'sym (treating it as a symbol), and returns the modified copy of the quotation quot2.

shorten

quot1 int quot2

Returns a quotation quot2 containing the first n values of the input quotation quot1.

size

quot int

Returns the length of quot.

slice

quot1 int1 int2 quot2

Creates a new quotation quot2 obtaining by selecting all elements of quot1 between indexes int1 and int2.

sort

quot1 quot2 quot3

Sorts all elements of quot1 according to predicate quot2.

symmetric-difference

quot1 quot2 quot3

Calculates the symmetric difference quot3 of quot1 and quot2.

take

quot1 int quot2

Returns a quotation quot2 containing the first n values of the input quotation quot1, or quot1 itself if int is greater than the length of quot1.

union

quot1 quot2 quot3

Calculates the union quot3 of quot1 and quot2.