to choose :n :k if :k = 0 [output 1] output (choose :n :k-1) * (:n - :k + 1) / :k end show choose 5 3 ; 10 show choose 60 30 ; 1.18264581564861e+17