For Development HEAD DRAFTSearch (procedure/syntax/module):

11.61 srfi.229 - Tagged procedures

Module: srfi.229

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

Macro: lambda/tag expr formals body …

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

Macro: case-lambda/tag expr clause …

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

Function: procedure/tag? obj

[SRFI-229]{srfi.229} Returns #t iff obj is a procedure and has a tag.

Function: procedure-tag proc

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



For Development HEAD DRAFTSearch (procedure/syntax/module):
DRAFT