Higher-Order Procedures
Sectioning
-
(sectionprocedurevalue-or-hole-1...value-or-hole-n) - Mediascheme Higher-order Procedure/Macro.
Creates a new procedure by specifying some
of the parameters to
procedure, leaving the rest as parameters for the result procedure. Holes (parameters for the result proedure) are indicated with the<>symbol. -
(left-sectionbinprocleft) - Traditional Higher-Order Procedure.
Given a two-parameter procedure and a value, creates a new
anonymous one-parameter procedure by filling in the first (left)
parameter of the procedure. The new procedure, when applied to
a value,
v, returns(.binprocleftv) -
(right-sectionbinprocright) - Traditional Higher-Order Procedure.
Given a two-parameter procedure and a value, creates a new
anonymous one-parameter procedure by filling in the second (right)
parameter of the procedure. The new procedure, when applied to
a value,
v, returns(.binprocvright) -
(l-sbinprocleft) - Traditional Higher-Order Procedure.
A shorthand for
left-section. -
(r-sbinprocright) - Traditional Higher-Order Procedure.
A shorthand for
right-section.
Boolean Higher-Order Procedures
-
(^andf1f2...fn) - Traditional Higher-Order Procedure.
A higher-order version of
and. Creates a new procedure that, when applied to some values, returns(and (f1values) (f2values) ... (fnvalues)). -
(^orf1f2...fn) - Traditional Higher-Order Procedure.
A higher-order version of
or. Creates a new procedure that, when applied to some values, returns(or (f1values) (f2values) ... (fnvalues)). -
(^notpred?) - Traditional Higher-Order Procedure.
A higher-order version of
not. Creates a new procedure, that, when applied to some values, returns the opposite ofpred?. That is, (1) ifpred?returns a truish value when applied to some parameters, the new procedure returns#fwhen applied to those same parameters; (2) ifpred?returns false when applied to some parameters, the new procedure returns#twhen applied to those same parameters.
Miscellaneous Higher-Order Procedures
-
(composefg) - Traditional Higher-Order Procedure.
Build a one-parameter procedure that applies g to its
parameter, and then f to that result.
((compose f g) x)is the same as(f (g x)). -
(of1f2...fn-1fn) - Traditional Higher-Order Procedure.
Build a one-parameter procedure that applies each
f, in turn, starting withfnand working backwards. The composition, when applied to a value,x, produces the same result as(f1 (f2 (... (fn-1 (fn x))))). -
(constantvalue) - Traditional Higher-Order Procedure.
Create a new function that always returns
value, no matter what parameters it is applied to.