Drkcore

25 04 2007 SICP elisp Tweet

elispでパスカル三角形

こんな感じで

(defun pscl (x y) 
  (cond ((< y 3) 1)
        ((= x 1) 1)
        ((= y x) 1)
        (t (+ (pscl (- x 1) (- y 1)) (pscl x (- y 1))))
        ))

About

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

Tag

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

Ad

© kzfm 2003-2021