RosettaCodeData/Task/Combinations/J/combinations-6.j

8 lines
116 B
Plaintext

combr=: dyad define
if.(x=#y) +. x=1 do.
y
else.
(({.y) ,. (x-1) combr (}.y)) , (x combr }.y)
end.
)