タグ

ブックマーク / mebious.neocities.org (1)

  • wired.infornography.neocities

    (defun next-life (array &optional results) (let* ((dimensions (array-dimensions array)) (results (or results (make-array dimensions :element-type 'bit)))) (destructuring-bind (rows columns) dimensions (labels ((entry (row col) "Return array(row,col) for valid (row,col) else 0." (if (or (not (< -1 row rows)) (not (< -1 col columns))) 0 (aref array row col))) (neighbor-count (row col &aux (count 0))

    ympbyc
    ympbyc 2015/06/12
    lainのLispキャプチャについて調べてたらなんか見つけた。
  • 1