RosettaCodeData/Task/Evaluate-binomial-coefficients/PicoLisp/evaluate-binomial-coefficients.l

8 lines
149 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
(de binomial (N K)
(let f
'((N)
(if (=0 N) 1 (apply * (range 1 N))) )
(/
(f N)
(* (f (- N K)) (f K)) ) ) )