▼ |  | Unstable

1 | Guidelines for developing unstable libraries
2 | Bytes
3 | Classes and Objects
4 | Contracts
5 | Definitions
6 | Dictionaries
7 | Directories
8 | Exceptions
9 | Filesystem
10 | Functions
11 | Lists
12 | Net
13 | Path
14 | PLane T Packages
15 | Ports
16 | Pretty-Printing
17 | Regular Expressions
18 | Requiring Modules
19 | Sandboxed Evaluation
20 | Scribble Documentation
21 | Sets
22 | S-Expression Diff
23 | Source Locations
24 | Strings
25 | Structs
26 | Syntax
27 | Planet Package Macros
28 | Text Representations
29 | Multiple Values
30 | XML and CSS
31 | Polymorphic Contracts
32 | Finding Mutated Variables
33 | Find
34 | Interface-Oriented Programming for Classes
35 | Sequences
36 | Hash Tables
37 | Match
38 | Generics
39 | Mark Parameters
40 | Debugging
41 | Contracts for macro subexpressions
42 | Contracts for struct type properties
43 | GUI libraries

On this page:

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

Version: 5.0.2
top ← prev up next →

### 39`` Mark Parameters

Jay McCarthy <jay@racket-lang.org>

( require unstable/markparam )

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

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 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.

( 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.

( 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.

( 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.

( 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 →