in reply to Re: integer partition golf
in thread integer partition golf

I don't think it can go much lower. I can only see a 1-character savings at this point, for 79:
sub p{my(@e,$o)=@_;$_{$_=join$",sort@_,$/}||=print;p(++$o,@e)while--$e +[0]}p pop

I second that.

I don't think it can go much lower. I can only see a 1-character saving at this point, for 78:

sub p{my(@e,$o)=@_;$_{$_="@{[sort@_]}\n"}||=print;p(++$o,@e)while--$e[ +0]}p pop

:-)

That fixes the leading $/, too.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^3: integer partition golf
by cephas (Pilgrim) on Oct 19, 2006 at 14:03 UTC
    Chopped on more char.....
    sub p{my(@e,$o)=@_;${$_="@{[sort@_]}\n"}||=print;p(++$o,@e)while--$e[0]}p pop