A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.racket-lang.org/reference/begin.html below:

3.15 Sequencing: begin, begin0, and begin-for-syntax

3.15 Sequencing: begin, begin0, and begin-for-syntax🔗ℹ

Sequencing in The Racket Guide introduces begin and begin0.

The first form applies when

begin

appears at the top level, at module level, or in an internal-definition position. In that case, the

begin

form is equivalent to splicing the

form

s into the enclosing context.

The second form applies for begin in an expression position. In that case, the exprs are evaluated in order, and the results are ignored for all but the last expr. The last expr is in tail position with respect to the begin form.

Examples:

Evaluates the first

expr

, then evaluates the other

exprs

s in order, ignoring their results. The results of the first

expr

are the results of the

begin0

form; the first

expr

is in tail position only if no other

expr

s are present.

Example:

See also module for information about expansion order and partial expansion for begin-for-syntax within a module context. Evaluation of an expr within begin-for-syntax is parameterized to set current-namespace as in let-syntax.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4