(index ("make-procedure-decorator" 0) ("procedure-decorator?" 1190) ("decorate-procedure" 1348) ("decorated-procedure?" 1966) ("procedure-decoration" 2163) ("procedure-decorator-getter-and-setter" 2503) ("make-procedure-extender" 2887) ("define-procedure-extender" 3225) ("decorated-lambda?" 3973) ("lambda-decoration" 4147) ("decorate-lambda" 4312))
(def (sig (procedure "(make-procedure-decorator PREDICATE DECORATOR RETRIEVER [#:initializer INITIALIZER] [#:replace? REPLACE?]) -> procedure-decorator" (id make-procedure-decorator))) (p "Returns a new " (tt "procedure-decorator") ".") (p "The " (tt "RETRIEVER") " is a procedure of at least one argument, the current procedure decoration, returning the procedure decoration object. Any following arguments are from the " (tt "procedure-decoration") " call that will invoke the " (tt "RETRIEVER") ".") (p "The " (tt "INITIALIZER") " is a procedure of varying arity, returning the procedure decoration initial object. The arguments are from the " (tt "decorate-procedure") " call that invokes the " (tt "INITIALIZER") ". The " (tt "INITIALIZER") " is invoked only once per procedure to decorate.") (p "The default " (tt "INITIALIZER") " is built from the " (tt "DECORATOR") ". The " (tt "DECORATOR") " will be called with a first argument of " (tt "(void)") ", and any other arguments from the " (tt "decorate-procedure") " call.") (p "The " (tt "REPLACE?") " flag determines whether the procedure object of a decorated procedure will be replaced (become). The default is " (tt "#f") "."))
(def (sig (procedure "(procedure-decorator? OBJECT) -> boolean" (id procedure-decorator?))) (p "Is the " (tt "OBJECT") " a " (tt "procedure-decorator") "?"))
(def (sig (procedure "(decorate-procedure PROCEDURE PROCEDURE-DECORATOR [ARGUMENTS ...]) -> procedure" (id decorate-procedure))) (p "Decorate the " (tt "PROCEDURE") " with the " (tt "PROCEDURE-DECORATOR") ".") (p "The " (tt "PROCEDURE-DECORATOR") " " (tt "INITIALIZER") " is called on the first invocation for " (tt "PROCEDURE") " and the " (tt "DECORATOR") " on all subsequent invocations.") (p "The optional " (tt "ARGUMENTS") " are passed to the invoked " (tt "PROCEDURE-DECORATOR") " constructor, as above.") (p "On the first invocation a " (tt "GC") " will be performed.") (p "Returns the decorated procedure."))
(def (sig (procedure "(decorated-procedure? PROCEDURE PROCEDURE-DECORATOR) -> boolean" (id decorated-procedure?))) (p "Is the " (tt "PROCEDURE") " a decorated by " (tt "PROCEDURE-DECORATOR") "?"))
(def (sig (procedure "(procedure-decoration PROCEDURE PROCEDURE-DECORATOR [ARGUMENTS ...]) -> *" (id procedure-decoration))) (p "Returns the procedure decoration of " (tt "PROCEDURE-DECORATOR") " for the " (tt "PROCEDURE") ".") (p "The optional " (tt "ARGUMENTS") " are passed to the " (tt "PROCEDURE-DECORATOR") " " (tt "RETRIEVER") "."))
(def (sig (procedure "(procedure-decorator-getter-and-setter PROCEDURE-DECORATOR) -> procedure" (id procedure-decorator-getter-and-setter))) (p "Returns a single argument getter, and creates a two argument setter, for the " (tt "PROCEDURE-DECORATOR") ".") (p "The getter takes a " (tt "PROCEDURE") " argument. The setter takes " (tt "PROCEDURE") " and " (tt "OBJECT") " arguments."))
(def (sig (procedure "(make-procedure-extender TAG) -> procedure-decorator" (id make-procedure-extender))) (p "Returns a simple " (tt "PROCEDURE-DECORATOR") " that recognizes its' decorations by the " (tt "TAG") " and accepts any object as a decoration.") (p "The " (tt "TAG") " is any object suitable for testing with " (tt "eq?") "."))
(def (sig (syntax "(define-procedure-extender TAG [GETTER-NAME [PREDICATE-NAME]])" (id define-procedure-extender))) (p "Creates a functional interface for a " (tt "PROCEDURE-DECORATOR") " that uses the {{TAG} symbol.") (p "Defines the " (tt "PROCEDURE-DECORATOR") " as " (tt "TAG-decorator") ".") (p "Defines a procedure named " (tt "GETTER-NAME") " that takes one argument, a decorated procedure, and returns the procedure decoration. Creates a corresponding setter. The default " (tt "GETTER-NAME") " is " (tt "TAG-decoration") ".") (p "Defines a procedure named " (tt "PREDICATE-NAME") " that takes one argument, a procedure, and returns whether the procedure is decorated. The default " (tt "PREDICATE-NAME") " is " (tt "TAG-decorated?") "."))
(def (sig (procedure "(decorated-lambda? PROCEDURE PREDICATE) -> boolean" (id decorated-lambda?))) (p "Is the " (tt "PROCEDURE") " decorated per the " (tt "PREDICATE") "?"))
(def (sig (procedure "(lambda-decoration PROCEDURE PREDICATE) -> *" (id lambda-decoration))) (p "Returns an object per the " (tt "PREDICATE") " or " (tt "#f") "."))
(def (sig (procedure "(decorate-lambda PROCEDURE PREDICATE DECORATOR)" (id decorate-lambda))) (p "Decorate the " (tt "PROCEDURE") " per the " (tt "PREDICATE") " with the result of the " (tt "DECORATOR") ".") (p "Returns the decorated procedure."))
