Changeset 32323 for lang/commonlisp
- Timestamp:
- 04/13/09 08:40:37 (4 years ago)
- Location:
- lang/commonlisp/paip
- Files:
-
- 1 added
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/commonlisp/paip/22/22.5.l
r31811 r32323 89 89 (defun extend-env (vars vals env) 90 90 "Add some variables and values to an environment." 91 (cond ((null vars) 92 (assert (null vals) () "Too many arguments supplied") 93 env) 94 ((atom vars) 95 (cons (list vars vals) env)) 96 (t (assert (rest vals) (first vals)) 97 (extend-env (rest args) (rest vals) env)))) 91 (nconc (mapcar #'list vars vals) env)) 98 92 99 93 (defun scheme-macro (symbol) -
lang/commonlisp/paip/23/23.1.l
r31811 r32323 76 76 (comp-if (second pred) else then env val? more?)) 77 77 (t (let ((pcode (comp pred env t t)) 78 (tcode (comp predenv val? more?))79 (ecode (comp predenv val? more?)))78 (tcode (comp then env val? more?)) 79 (ecode (comp else env val? more?))) 80 80 (cond 81 81 ((equal tcode ecode) ; (if p x x) => (begin p x) … … 114 114 (assert (null args) () "Too many arguments supplied") 115 115 (comp-begin (rest2 f) env val? more?)) 116 (mo er? ; Need to save the continuation point116 (more? ; Need to save the continuation point 117 117 (let ((k (gen-label 'k))) 118 118 (seq (gen 'SAVE k) … … 123 123 (if (not val?) (gen 'POP))))) 124 124 (t ; function call as rename plus goto 125 (assert (or (symbolp f) 126 (consp f)) 127 () "Function must be symbol or cons") 125 128 (seq (comp-list args env) 126 129 (comp f env t t) … … 218 221 (defun scheme-macro-expand (x) 219 222 "Macro-expand this Scheme expression." 223 (print (list 'scheme-macro-expand x)) 220 224 (if (and (listp x) (scheme-macro (first x))) 221 225 (scheme-macro-expand
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)