RosettaCodeData/Task/Combinations/Logo/combinations.logo
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

7 lines
205 B
Text

to comb :n :list
if :n = 0 [output [[]]]
if empty? :list [output []]
output sentence map [sentence first :list ?] comb :n-1 bf :list ~
comb :n bf :list
end
print comb 3 [0 1 2 3 4]