▼ |  | Unstable: May Change Without Warning

1 | Guidelines for Developing unstable Libraries
2 | Automata: Compiling State Machines
3 | Bytes
4 | Contracts
5 | Contracts for Macro Subexpressions
6 | Debugging
7 | Definitions
8 | Errors
9 | Filesystem
10 | Find
11 | Flonums
12 | Futures
13 | Functions
14 | Hash Tables
15 | Interface-Oriented Programming for Classes
16 | Lazy Require
17 | Lists
18 | Logging
19 | Macro Testing
20 | Mark Parameters
21 | Match
22 | Open place expressions
23 | Options
24 | Parameter Groups
25 | Pretty-Printing
26 | Re-Contracting Identifiers
27 | Sandbox
28 | Sequences
29 | Strings
30 | Structs
31 | Struct Printing
32 | Syntax
33 | Temporal Contracts: Explicit Contract Monitors
34 | Unix Domain Sockets
35 | 2D Syntax
36 | GUI Libraries

On this page:

mark-parameter
mark-parameter-first
mark-parameter-all
mark-parameters-all
mark-parameterize

5.3.6
top ← prev up next →

### 20`` Mark Parameters

Jay McCarthy <jay@racket-lang.org>

This library is unstable; compatibility will not be maintained. See Unstable: May Change Without Warning for more information.

(require unstable/markparam)

This library provides a simplified version of parameters that are backed by continuation marks, rather than parameterizations. This means they are slightly slower, are not inherited by child threads, do not have initial values, and cannot be imperatively mutated.

> > struct

> > (struct mark-parameter ())

The struct for mark parameters. It is guaranteed to be serializable and transparent. If used as a procedure, it calls mark-parameter-first on itself.

> > procedure

> > (mark-parameter-first mp [tag]) → any/c

> mp : mark-parameter?

> | tag |  | : |  | continuation-prompt-tag?
> |  |  | = |  | default-continuation-prompt-tag

Returns the first value of mp up to tag.

> > procedure

> > (mark-parameter-all mp [tag]) → list?

> mp : mark-parameter?

> | tag |  | : |  | continuation-prompt-tag?
> |  |  | = |  | default-continuation-prompt-tag

Returns the values of mp up to tag.

> > procedure

> > (mark-parameters-all mps none-v [tag]) → (listof vector?)

> mps : (listof mark-parameter?)
> none-v : [any/c #f]

> | tag |  | : |  | continuation-prompt-tag?
> |  |  | = |  | default-continuation-prompt-tag

Returns the values of the mps up to tag. The length of each vector in the result list is the same as the length of mps, and a value in a particular vector position is the value for the corresponding mark parameter in mps. Values for multiple mark parameter appear in a single vector only when the mark parameters are for the same continuation frame in the current continuation. The none-v argument is used for vector elements to indicate the lack of a value.

> > syntax

> > (mark-parameterize ([mp expr] ...) body-expr ...)

Parameterizes (begin body-expr ...) by associating each mp with the evaluation of expr in the parameterization of the entire expression.
top ← prev up next →