chickadee » holes » @@

(@@ code)syntax

extracts the holes out of the argument expression, code, sorts them numerically while removing dups and considers the resulting list as the argument list of a procedure, with code as body.

Alternatively, searches for a colon in code, checks if the expressions to the left of it are all symbols without dups, and considers those symbols as argument list of a procedure with body the expressions to the right of the colon.

This macro can be called with sharp-read-syntax ## as well. Note, that ##xpr is always a procedure, maybe a thunk, if there are no holes in xpr.