Arc Cross Reference |
iflet[macro] iflet var expr then rest ...Evaluates expr. If it yields non-nil, binds the result to var and evaluates then. Othewise interpretes rest as in if. (mac iflet (var expr then . rest) (w/uniq gv `(let ,gv ,expr (if ,gv (let ,var ,gv ,then) ,@rest)))) See also whenlet. In the standard Scheme terms, it captures this common pattern (NB: if rest has multiple forms, the expansion will be a bit different because of Arc's if semantics). (cond [expr => (lambda (var) then)] [else rest]) Categories:conditional,binding
| AboutAlphabetical Indexa b c d e f g h i j k l m n o p q r s t u v w x y z other ReleasesRelated |