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

8 lines
149 B
Text
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
(de binomial (N K)
2015-02-20 00:35:01 -05:00
(let f
'((N)
(if (=0 N) 1 (apply * (range 1 N))) )
(/
(f N)
(* (f (- N K)) (f K)) ) ) )