Guest

Common Lisp version of the MaxParts function

By: a guest on Mar 19th, 2010  |  syntax: Lisp  |  size: 0.17 KB  |  hits: 64  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. (defun MaxParts (Dimension Cuts)
  2.   (if (>= D C)
  3.     (expt 2 C)
  4.     (if (= D 0)
  5.       1
  6.       (if (= C 0)
  7.         1
  8.         (+ (mp (- D 1) (- C 1)) (mp D (- C 1)))))))