A RetroSearch Logo

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

Search Query:

Showing content from http://www.lispworks.com/documentation/lw71/LW/html/lw-810.htm below:

rebinding

rebinding Summary

Ensures unique names for all the variables in a groups of forms.

Signature

rebinding (&rest vars) &body body => form

Arguments

vars

The variables to be rebound.

body

A body of forms, the variables in which should be unique.

Values

Returns the body wrapped in a form that creates unique names for each variable.

Description

Returns the body wrapped in a form which creates a unique name for each of the variables (compare with gensym) and binds these names to the values of the variables. This ensures that the body can refer to the variables without name clashes with other variables elsewhere.

Example

After defining

(defmacro lister (x y)
   (rebinding (x y)
      '(list ,x ,y)))

the form (lister i j) macroexpands to

(LET* ((#:X-77 I)
       (#:Y-78 J))
          (LIST #:X-77 #:Y-78))

LispWorks User Guide and Reference Manual - 20 Sep 2017


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