chickadee » fmt » fmt-if

fmt-if <pred> <pass> #!optional <fail>procedure

<pred> takes one argument (the format state) and returns a boolean result. If true, the <pass> format is applied to the state, otherwise <fail> (defaulting to the identity) is applied.

Many of the previously mentioned combinators have behavior which can be altered with state variables. Although fmt-let and fmt-bind could be used, these common variables have shortcuts: