Ordered partitions: Difference between revisions
Content added Content deleted
m (→{{header|Sidef}}: updated code) |
|||
Line 1,757: | Line 1,757: | ||
func part(s, args) { |
func part(s, args) { |
||
gather { |
gather { |
||
s.combinations(args[0], { |c| |
s.combinations(args[0], { |*c| |
||
part(s - c, args.ft(1)).each{|r| take([c] + r) } |
part(s - c, args.ft(1)).each{|r| take([c] + r) } |
||
}) |
}) |