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]