(index ("str#" 0) ("type-case" 267) ("type-case*" 1020) ("whennot" 1436) ("swap-set!" 1547) ("fluid-set!" 1730) ("stiff-set!" 1875) ("set!-op" 2018) ("assure" 2421) ("define-reference-let" 2626) ("NAME" 3101) ("warning-guard" 3899) ("checked-guard" 4760) ("define-warning-parameter" 5691) ("define-checked-parameter" 6407) ("hash-let" 7121) ("++" 8367) ("--" 8586) ("fx++" 8805) ("fx--" 8883) ("fp++" 8961) ("fp--" 9039) ("fl++" 9117) ("fl--" 9220) ("++!" 9323) ("--!" 9390) ("fx++!" 9457) ("fx--!" 9535) ("fp++!" 9613) ("fp--!" 9691) ("fl++!" 9769) ("fl--!" 9872))
(def (sig (syntax "(str# STRING)" (id str#))) (p "Allows substitution of embedded Scheme expressions prefixed with # and optionally enclosed in curly brackets. Two consecutive #s are translated to a single #.") (p "Similar to the " (tt "#<#") " multi-line string."))
(def (sig (syntax "(type-case EXPRESSION [(TYPE-CASE BODY ...) ...]))" (id type-case))) (p "Expands into a form that selects a " (tt "TYPE-CASE") " based on the type of the " (tt "EXPRESSION") ".") (p "A " (tt "TYPE-CASE") " is:") (dl (dt (tt "symbol")) (dd "the base name of a type predicate") (dt "(" (tt "symbol") " " (tt "symbol") "...)") (dd "a list of base names") (dt (tt "else")) (dd "an else clause")) (p "The actual name of the predicate is built from the base name and a " (tt "?") " suffix. So a base name " (tt "number") " has the predicate " (tt "number?") ".") (highlight scheme "(use moremacros)\n\n(type-case 23\n  ((symbol string char) 'symbolic)\n  (number               'numeric)\n  (else                 'otheric) )\n;=> numeric"))
(def (sig (syntax "(type-case* EXPRESSION [(TYPE-TEST BODY ...) ...]))" (id type-case*))) (p "Like " (tt "type-case") " but binds local variable " (tt "it") " to the value of " (tt "EXPRESSION") ".") (highlight scheme "(use moremacros)\n\n(type-case* 23\n  ((symbol string char) (list it 'symbolic) )\n  (number               (list it 'numeric) )\n  (else                 (list it 'otheric) ) )\n;=> (23 numeric)"))
(def (sig (syntax "(whennot TEST [BODY ...]))" (id whennot))) (p "Synonym for " (tt "miscmacros#unless") "."))
(def (sig (syntax "(swap-set! VAR1 VAR2))" (id swap-set!))) (p "Swap settings of " (tt "VAR1") " & " (tt "VAR2") ".") (p "Like " (tt "(exchange! VAR1 VAR2)") " but lower overhead."))
(def (sig (syntax "(fluid-set! VAR VAL ...))" (id fluid-set!))) (p "Set each variable " (tt "VAR") " to the value " (tt "VAL") " in parallel."))
(def (sig (syntax "(stiff-set! VAR VAL ...))" (id stiff-set!))) (p "Set each variable " (tt "VAR") " to the value " (tt "VAL") " in series."))
(def (sig (syntax "(set!-op VAR OP ARG...))" (id set!-op))) (p "Sets " (tt "VAR") " to the value of " (tt "(OP ARG...)") ", where an occurrence of <> in " (tt "ARG...") " is replaced with " (tt "VAR") ".") (p "When there is no occurrence of <> in " (tt "ARG...") " the template " (tt "(OP <> ARG...)") " is used.") (p "Similar to the C language family " (tt "<l-value> <bin-op-assign> <r-value>") "."))
(def (sig (syntax "(assure EXPRESSION [ERROR-ARGUMENT...]))" (id assure))) (p "When " (tt "EXPRESSION") " yields value " (tt "#f") " invoke " (tt "(error ERROR-ARGUMENT...)") ", otherwise return value."))
(def (sig (syntax "(define-reference-let NAME REFERENCE-FUNCTION)" (id define-reference-let))) (p (tt "NAME") " is a " (tt "symbol") ", the name of the generated " (i "reference-let") " macro.") (p (tt "REFERENCE-FUNCTION") " is a " (tt "(procedure (* * *) *)") " with arguments:") (p "The " (tt "REFERENCE-FUNCTION") " is to return the value for " (tt "KEY") " in the " (tt "TABLE") ", otherwise the " (tt "DEFAULT") " value.") (p "The generated macro has the signature:"))
(def (sig (syntax "(NAME TABLE (VAR | (VAR) | (VAR KEY [DEFAULT]) ...) BODY ...)" (id NAME))) (dl (dt (tt "TABLE")) (dd "some data-structure instance that reifies a set of key+value abstraction") (dt (tt "KEY")) (dd "identifier for a possible entry in the " (tt "TABLE")) (dt (tt "DEFAULT")) (dd "in case an entry for the " (tt "KEY") " does not exist")) (p "Decompose " (tt "TABLE") " entries into variable bindings. Should the " (tt "KEY") " not be a " (tt "symbol") ", or the desired variable name " (tt "VAR") ", as " (tt "'VAR") ", is not the key, the " (tt "(VAR KEY [DEFAULT])") " form can be used.") (p "The default for " (tt "DEFAULT") " is " (tt "#f") ".") (p "The " (tt "BODY...") " is evaluated with the specified bindings.") (p "See " (int-link "hash-let") " for an example of use."))
(def (sig (syntax "(warning-guard GETTER-NAME TYPENAME [BODY...])" (id warning-guard))) (p "Constructs a variable or parameter guard procedure that generates a warning and returns the current value when the type predicate fails, otherwise the submitted value is returned.") (p (tt "TYPENAME") " is an " (tt "identifier") " and " (tt "TYPENAME?") " is a " (tt "(procedure (*) boolean)") ".") (p (tt "GETTER-NAME") " is an " (tt "identifier") " and the name of a " (tt "procedure _ *") ".") (p (tt "BODY") " is zero or more expressions that are performed after a successful typecheck with " (tt "obj") " bound to the new parameter value. " (i "Note") " that since the guard is invoked by a " (tt "variable") " or " (tt "parameter") " during initialization, so will be the body code.") (highlight scheme "(use variable-item)\n\n(warning-guard some-var integer)"))
(def (sig (syntax "(checked-guard GETTER-NAME TYPENAME [BODY...])" (id checked-guard))) (p "Constructs a variable or parameter guard procedure that uses a type check procedure to verify the submitted value is returned.") (p (tt "TYPENAME") " is an " (tt "identifier") " and " (tt "check-TYPENAME") " is a " (tt "(procedure ((or #f symbol) * #!optional (or symbol string)) *)") ". See " (int-link "check-errors") " for a suite of these procedures.") (p (tt "GETTER-NAME") " is an " (tt "identifier") " and the name of a " (tt "procedure _ *") ".") (p (tt "BODY") " is zero or more expressions that are performed after a successful typecheck with " (tt "obj") " bound to the new parameter value. " (i "Note") " that since the guard is invoked by a " (tt "variable") " or " (tt "parameter") " during initialization, so will be the body code.") (highlight scheme "(use variable-item type-checks)\n\n(checked-guard some-var integer)"))
(def (sig (syntax "(define-warning-parameter NAME INIT TYPENAME [BODY...])" (id define-warning-parameter))) (p "Wrapper around " (tt "define-parameter") " and " (tt "warning-guard") " that defines the parameter " (tt "NAME") " to the " (i "parameter") ".") (p (tt "NAME") " is an " (tt "identifier") ".") (p (tt "INIT") " is some Scheme " (tt "object") ".") (p (tt "TYPENAME") " is an " (tt "identifier") ". The basename of a type predicate; see " (int-link "#warning-guard" "warning-guard") ".") (p (tt "BODY...") " as for " (tt "warning-guard") ".") (highlight scheme "(use parameter-item)\n\n(define-warning-variable scale * procedure)\n(scale 23) ;=> Warning: (foo) \"bad argument type - not a procedure\" 23"))
(def (sig (syntax "(define-checked-parameter NAME INIT TYPENAME [BODY...])" (id define-checked-parameter))) (p "Wrapper around " (tt "define-parameter") " and " (tt "checked-guard") " that defines the variable " (tt "NAME") " to the " (i "parameter") ".") (p (tt "NAME") " is an " (tt "identifier") ".") (p (tt "INIT") " is some Scheme " (tt "object") ".") (p (tt "TYPENAME") " is an " (tt "identifier") ". The basename of a type predicate; see " (int-link "#checked-guard" "checked-guard") ".") (p (tt "BODY...") " as for " (tt "checked-guard") ".") (highlight scheme "(use parameter-item)\n\n(define-checked-parameter scale * procedure)\n(scale 23) ;=> Error: (foo) \"bad argument type - not a procedure\" 23"))
(def (sig (syntax "(hash-let HASH-TABLE (VAR | (VAR) | (VAR KEY [DEFAULT]) ...) BODY ...)" (id hash-let))) (p "Decompose " (tt "HASH-TABLE") " entries into variable bindings. Should the " (tt "KEY") " not be a " (tt "symbol") ", or the desired variable name " (tt "VAR") " is not the key, the " (tt "(VAR KEY [DEFAULT])") " form can be used.") (p "The default value for a missing hash-table entry is " (tt "#f") " but can be specified with the " (tt "(VAR KEY DEFAULT)") " form.") (p "The " (tt "BODY...") " is evaluated with the specified bindings.") (highlight scheme "(use hash-let srfi-69)\n\n(define tbl (make-hash-table))\n\n(hash-table-set! tbl 'abc \"commercial network\")\n(hash-table-set! tbl \"abc\" \"commercial network\")\n(hash-table-set! tbl 'cbs \"commercial network\")\n(hash-table-set! tbl \"cbs\" \"commercial network\")\n\n(hash-let tbl ((abc)\n               (cbs \"cbs\")\n               (pbs (string-append \"p\" \"bs\") #t)\n               tbs)\n  (print 'abc \" is a \" abc) (print \"cbs\" \" is a \" cbs)\n  (print (string-append \"p\" \"bs\") \" is a \" pbs)\n  (print 'tbs \" is a \" tbs) )") (p "This prints the following:") (pre "abc is a commercial network\ncbs is a commercial network\npbs is a #t\ntbs is a #f"))
(def (sig (syntax "(++ VAL)" (id ++))) (p "Read-only increment.") (p "When " (tt "VAL") " is a numeric literal the strongest operation available is used in the generated expression, based on the type of the literal."))
(def (sig (syntax "(-- VAL)" (id --))) (p "Read-only decrement.") (p "When " (tt "VAL") " is a numeric literal the strongest operation available is used in the generated expression, based on the type of the literal."))
(def (sig (syntax "(fx++ VAL)" (id fx++))) (p "Read-only fixnum increment."))
(def (sig (syntax "(fx-- VAL)" (id fx--))) (p "Read-only fixnum decrement."))
(def (sig (syntax "(fp++ VAL)" (id fp++))) (p "Read-only flonum increment."))
(def (sig (syntax "(fp-- VAL)" (id fp--))) (p "Read-only flonum decrement."))
(def (sig (syntax "(fl++ VAL)" (id fl++))) (p "Read-only flonum increment.") (p "R6RS nomenclature."))
(def (sig (syntax "(fl-- VAL)" (id fl--))) (p "Read-only flonum decrement.") (p "R6RS nomenclature."))
(def (sig (syntax "(++! VAR)" (id ++!))) (p "Mutable increment."))
(def (sig (syntax "(--! VAR)" (id --!))) (p "Mutable decrement."))
(def (sig (syntax "(fx++! VAR)" (id fx++!))) (p "Mutable fixnum increment."))
(def (sig (syntax "(fx--! VAR)" (id fx--!))) (p "Mutable fixnum decrement."))
(def (sig (syntax "(fp++! VAR)" (id fp++!))) (p "Mutable flonum increment."))
(def (sig (syntax "(fp--! VAR)" (id fp--!))) (p "Mutable flonum decrement."))
(def (sig (syntax "(fl++! VAR)" (id fl++!))) (p "Mutable flonum increment.") (p "R6RS nomenclature."))
(def (sig (syntax "(fl--! VAR)" (id fl--!))) (p "Mutable flonum decrement.") (p "R6RS nomenclature."))
