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

8 lines
116 B
Text
Raw Permalink Normal View History

2020-02-17 23:21:07 -08:00
combr=: dyad define
if.(x=#y) +. x=1 do.
y
else.
(({.y) ,. (x-1) combr (}.y)) , (x combr }.y)
end.
)