Next: , Previous: , Up: iklib syntaxes   [Index]


6.8.5 Additional binding syntaxes

Syntax: receive ?formals ?expression ?body0 ?body

Expect ?expression to evaluate to multiple values and bind such values as specified by the ?formals; evaluate the ?body in the region of such bindings. The expansion is:

(receive ?formals
    ?expression
  ?body0 ?body …)
→ (call-with-values
        (lambda ()
          ?expression)
      (lambda ?formals
        ?body0 ?body …))
Syntax: receive-and-return (?retval …) ?expression ?body0 ?body

Expect ?expression to evaluate to multiple values and bind such values to the identifiers ?retval; evaluate the ?body forms in the region of such bindings; return the values bound to ?retval. The expansion is:

(receive-and-return (?retval …)
    ?expression
  ?body0 ?body …)
→ (call-with-values
        (lambda ()
          ?expression)
      (lambda (?retval …)
        ?body0 ?body …
        (values ?retval …)))
Syntax: let*-syntax ((?lhs ?rhs) …) ?form0 ?form

Similar to let-syntax, expands into nested let-syntax forms:

(let*-syntax () ?body)
→ (begin () ?body)

(let*-syntax ((?lhs ?rhs)) ?body)
→ (let-syntax ((?lhs ?rhs)) ?body)

(let*-syntax ((?lhs0 ?rhs0)
              (?lhs ?rhs)
              ...)
  ?body)
→ (let-syntax ((?lhs0 ?rhs0))
      (let*-syntax ((?lhs ?rhs) ...) ?body))
Syntax: let-constants ((?lhs ?rhs) …) ?body0 ?body

Like let but create immutable bindings. Attempting to mutate the bindings with set! will result in an expand time syntax violation.

Syntax: let*-constants ((?lhs ?rhs) …) ?body0 ?body

Like let* but create immutable bindings. Attempting to mutate the bindings with set! will result in an expand time syntax violation.

Syntax: letrec-constants ((?lhs ?rhs) …) ?body0 ?body

Like letrec but create immutable bindings. Attempting to mutate the bindings with set! will result in an expand time syntax violation.

Syntax: letrec*-constants ((?lhs ?rhs) …) ?body0 ?body

Like letrec* but create immutable bindings. Attempting to mutate the bindings with set! will result in an expand time syntax violation.


Next: , Previous: , Up: iklib syntaxes   [Index]