pmt: Lists

pmt.map(pmt_t proc, pmt_t list) → pmt_t

Apply element-wise to the elements of list and returns a list of the results, in order.

must be a list. The dynamic order in which is applied to the elements of is unspecified.

pmt.reverse(pmt_t list) → pmt_t

reverse .

must be a proper list.

pmt.reverse_x(pmt_t list) → pmt_t

destructively reverse .

must be a proper list.

pmt.acons(pmt_t x, pmt_t y, pmt_t a) → pmt_t

(acons x y a) == (cons (cons x y) a)

pmt.nth(size_t n, pmt_t list) → pmt_t
locates element of list where the car is the ‘zeroth’ element.
pmt.nthcdr(size_t n, pmt_t list) → pmt_t

returns the tail of that would be obtained by calling cdr times in succession.

pmt.memq(pmt_t obj, pmt_t list) → pmt_t

Return the first sublist of whose car is . If does not occur in , then #f is returned. pmt::memq use pmt::eq to compare with the elements of .

pmt.memv(pmt_t obj, pmt_t list) → pmt_t

Return the first sublist of whose car is . If does not occur in , then #f is returned. pmt::memv use pmt::eqv to compare with the elements of .

pmt.member(pmt_t obj, pmt_t list) → pmt_t

Return the first sublist of whose car is . If does not occur in , then #f is returned. pmt::member use pmt::equal to compare with the elements of .

pmt.subsetp(pmt_t list1, pmt_t list2) → bool

Return true if every element of appears in , and false otherwise. Comparisons are done with pmt::eqv.

pmt.list1(pmt_t x1) → pmt_t

Return a list of length 1 containing .

pmt.list2(pmt_t x1, pmt_t x2) → pmt_t

Return a list of length 2 containing , .

pmt.list3(pmt_t x1, pmt_t x2, pmt_t x3) → pmt_t

Return a list of length 3 containing , , .

pmt.list4(pmt_t x1, pmt_t x2, pmt_t x3, pmt_t x4) → pmt_t

Return a list of length 4 containing , , , .

pmt.list5(pmt_t x1, pmt_t x2, pmt_t x3, pmt_t x4, pmt_t x5) → pmt_t

Return a list of length 5 containing , , , , .

pmt.list6(pmt_t x1, pmt_t x2, pmt_t x3, pmt_t x4, pmt_t x5, pmt_t x6) → pmt_t

Return a list of length 6 containing , , , , , .

pmt.list_add(pmt_t list, pmt_t item) → pmt_t

Return with added to it.

pmt.list_rm(pmt_t list, pmt_t item) → pmt_t

Return with removed from it.

pmt.list_has(pmt_t list, pmt_t item) → bool

Return bool of contains .

Previous topic

pmt: Dictionary

Next topic

pmt: Pairs

This Page