▼ |  | Unstable

1 | Guidelines for developing unstable libraries
2 | Bytes
3 | Contracts
4 | Exceptions
5 | Lists
6 | Net
7 | Path
8 | Source Locations
9 | Strings
10 | Structs
11 | Syntax
12 | Anaphoric Contracts
13 | Finding Mutated Variables
14 | Find
15 | Interface-Oriented Programming for Classes
16 | Sequences
17 | Hash Tables
18 | Match
19 | Skip Lists
20 | Interval Maps
21 | GUI libraries

On this page:

in-syntax
in-pairs
in-sequence-forever
sequence-lift

top← prev up next →

### 16`` Sequences

Sam Tobin-Hochstadt <samth@ccs.neu.edu>

(require unstable/sequence)

This library is unstable; compatibility will not be maintained. See Unstable for more information.

(in-syntax stx) → sequence?
stx : syntax?

Produces a sequence equivalent to (syntax->list lst).
An in-syntax application can provide better performance for syntax iteration when it appears directly in a for clause.

Example:

> (for/list ([x (in-syntax #'(1 2 3))])
x)

(#<syntax:2:0 1> #<syntax:2:0 2> #<syntax:2:0 3>)

(in-pairs seq) → sequence?
seq : sequence?

Produces a sequence equivalent to (in-parallel (lift car seq) (lift cdr seq)).

(in-sequence-forever seq val) → sequence?
seq : sequence?
val : any/c

Produces a sequence whose values are the elements of seq, followed by val repeated.

(sequence-lift f seq) → sequence?
f : procedure?
seq : sequence?

Produces the sequence of f applied to each element of seq.
top← prev up next →