関数型言語の勉強にSICPを読もう - (37) 3章 - 小休止 cut/let1

Gaucheのリファレンスを眺めていて面白かったのでメモ。
cutとlet1はマクロみたいです。

;; macro cut
(define (make-plus)
  (lambda (a b)
    (+ a b)))

(display ((make-plus) 4 5))

(define (make-plus)
  (cut + <> <>))

(display ((make-plus) 4 5))

;; macro let1
(let1 a 'a (display a))


※「SICPを読もう」の目次はこちら


計算機プログラムの構造と解釈
Gerald Jay Sussman Julie Sussman Harold Abelson 和田 英一
ピアソンエデュケーション (2000/02)
売り上げランキング: 56,404