Combinations and permutations: Difference between revisions

m
(Added Haskell version)
Line 524:
 
<lang J>C=: !
P=: (<%&!&x:~ * (*/@}. 1+i.)<:)"0</lang>
 
C is a primitive, but we will give it a name for this task. P could be defined using %&!~ but that approach would overflow for large arguments even when the result would have been representable.
 
Example use:
6,962

edits