SICP 問題 4.01
;; 評価順によらず,左から右に評価するlist-of-values (define (list-of-values exps env) (if (no-operands? exps) '() (let ((first-eval (eval (first-operand exp) env))) (cons first-eval (list-of-values (rest-operands exps) env))))) ;; 右から左に評価するlist-of-values (define (list-of-values exps env) (if (no-operands? exps) '() (let ((first-eval (list-of-values (rest-operands exps) env))) (cons (eval (first-operand exp) env) first-eval))))
- 作者: ハロルドエイブルソン,ジュリーサスマン,ジェラルド・ジェイサスマン,Harold Abelson,Julie Sussman,Gerald Jay Sussman,和田英一
- 出版社/メーカー: 翔泳社
- 発売日: 2014/05/17
- メディア: 大型本
- この商品を含むブログ (2件) を見る