Drkcore

12 01 2009 lisp Tweet

λ計算(Y-combinator)

入門Common Lispの第8章が面白いですね。

ProductName 入門Common Lisp―関数型4つの特徴とλ(ラムダ)計算
新納 浩幸
毎日コミュニケーションズ / ¥ 2,415 ()
通常24時間以内に発送

λ式を使って数を定義していって、次に足し算、掛け算を実装。最後にY-combinatorを使った再帰を定義して、階乗を計算させる。

(defun Y (f n) (funcall (funcall f f) n))

この流れでGrassも理解しておきたいところ。

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021