##### 7.4.13.1 SRFI-1

`(require 'srfi-1)`

Implements the SRFI-1 list-processing library as described
at http://srfi.schemers.org/srfi-1/srfi-1.html

#### Constructors

— Function:

**xcons**` d a`
`(define (xcons d a) (cons a d))`

.

— Function:

**list-tabulate**` len proc`
Returns a list of length `len`. Element `i` is
`(`

`proc` `i``)`

for 0 <= `i` < `len`.

— Function:

**cons***` obj1 obj2`
— Function:

**list-copy**` flist`
— Function:

**iota**` count start step`
— Function:

**iota**` count start`
— Function:

**iota**` count`
Returns a list of `count` numbers: (`start`, `start`+`step`, ..., `start`+(`count`-1)*`step`).

— Function:

**circular-list**` obj1 obj2 ...`
Returns a circular list of `obj1`, `obj2`, ....

#### Predicates

— Function:

**proper-list?**` obj`
— Function:

**circular-list?**` x`
— Function:

**dotted-list?**` obj`
— Function:

**null-list?**` obj`
— Function:

**not-pair?**` obj`
— Function:

**list=**` =pred list ...`
#### Selectors

— Function:

**fifth**` pair`
— Function:

**sixth**` pair`
— Function:

**seventh**` pair`
— Function:

**eighth**` pair`
— Function:

**ninth**` pair`
— Function:

**tenth**` pair`
— Function:

**drop**` lst k`
— Function:

**take**` lst k`
— Function:

**take!**` lst k`
— Function:

**take-right**` lst k`
— Function:

**drop-right**` lst k`
— Procedure:

**drop-right!**` lst k`
— Function:

**split-at**` lst k`
— Function:

**split-at!**` lst k`
— Function:

**last**` lst k ...`
#### Miscellaneous

— Function:

**length+**` clist`
— Function:

**concatenate**` lists`
— Function:

**concatenate!**` lists`
— Procedure:

**reverse!**` lst`
— Function:

**append-reverse**` rev-head tail`
— Function:

**append-reverse!**` rev-head tail`
— Function:

**zip**` list1 list2 ...`
— Function:

**unzip1**` lst`
— Function:

**unzip2**` lst`
— Function:

**unzip3**` lst`
— Function:

**unzip4**` lst`
— Function:

**unzip5**` lst`
— Function:

**count**` pred list1 list2 ...`
#### Fold and Unfold

— Function:

**fold**` kons knil clist1 clist2 ...`
— Function:

**fold-right**` kons knil clist1 clist2 ...`
— Function:

**pair-fold**` kons knil clist1 clist2 ...`
— Function:

**pair-fold-right**` kons knil clist1 clist2 ...`
— Function:

**reduce**` arg ...`
— Procedure:

**map!**` f clist1 clist2 ...`
— Function:

**pair-for-each**` f clist1 clist2 ...`
#### Filtering and Partitioning

— Function:

**filter**` pred list`
— Procedure:

**filter!**` pred list`
— Function:

**partition**` pred list`
— Function:

**remove**` pred list`
— Procedure:

**partition!**` pred list`
— Procedure:

**remove!**` pred list`
#### Searching

— Function:

**find**` pred clist`
— Function:

**find-tail**` pred clist`
— Function:

**span**` pred list`
— Procedure:

**span!**` pred list`
— Function:

**break**` pred list`
— Procedure:

**break!**` pred list`
— Function:

**any**` pred clist1 clist2 ...`
— Function:

**list-index**` pred clist1 clist2 ...`
— Function:

**member**` obj list =`
— Function:

**member**` obj list`
#### Deleting

— Function:

**delete-duplicates**` x list =`
— Function:

**delete-duplicates**` x list`
— Procedure:

**delete-duplicates!**` x list =`
— Procedure:

**delete-duplicates!**` x list`
#### Association lists

— Function:

**assoc**` obj alist pred`
— Function:

**assoc**` obj alist`
— Function:

**alist-cons**` key datum alist`
— Function:

**alist-copy**` alist`
— Function:

**alist-delete**` key alist =`
— Function:

**alist-delete**` key alist`
— Procedure:

**alist-delete!**` key alist =`
— Procedure:

**alist-delete!**` key alist`
#### Set operations

— Function:

**lset<=**` = list1 ...`
Determine if a transitive subset relation exists between the lists `list1`
..., using `=` to determine equality of list members.

— Function:

**lset=**` = list1 list2 ...`
— Function:

**lset-adjoin**` list elt1 ...`
— Function:

**lset-union**` = list1 ...`
— Function:

**lset-intersection**` = list1 list2 ...`
— Function:

**lset-difference**` = list1 list2 ...`
— Function:

**lset-xor**` = list1 ...`
— Function:

**lset-diff+intersection**` = list1 list2 ...`
These are linear-update variants. They are allowed, but not
required, to use the cons cells in their first list parameter to
construct their answer. `lset-union!`

is permitted to recycle
cons cells from any of its list arguments.

— Procedure:

**lset-intersection!**` = list1 list2 ...`
— Procedure:

**lset-difference!**` = list1 list2 ...`
— Procedure:

**lset-union!**` = list1 ...`
— Procedure:

**lset-xor!**` = list1 ...`
— Procedure:

**lset-diff+intersection!**` = list1 list2 ...`