RosettaCodeData/Task/Combinations/Logo/combinations.logo

8 lines
205 B
Plaintext

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]