srfi.229
- Tagged procedures ¶This srfi allows to attach auxiliary information (tag) to a procedure. A tag can be attached when a procedure is created, and later retrieved. A procedure itself should be considered as an immutable entity, so you can’t attach or remove a tag to an existing procedure (although you can attach a mutable structure as a tag and mutate it later; much like the closed environment can be mutated).
[SRFI-229]{srfi.229
}
Evaluates expr, and returns a procedure that is
the same as (lambda formals body …)
except that
the value of expr is attached as a tag to the resulting
procedure. The tag can be retrieved with procedure-tag
.
[SRFI-229]{srfi.229
}
Each clause is (formals body …)
, much like
the ordinary case-lambda
.
First evaluates expr, and returns a procedure that is
the same as (case-lambda clause …)
, excpet that
the value of expr is attached as a tag to the resulting
procedure. The tag can be retrieved with procedure-tag
.
[SRFI-229]{srfi.229
}
Returns #t
iff obj is a procedure and has a tag.
[SRFI-229]{srfi.229
}
Returns a tag of proc, which must be a tagged procedure.
If proc is not a procedure or not tagged, an error
is signaled.