<?xml version="1.0" encoding="windows-1252"?>
<node id="84264" title="Re: Re: Binomial Golf" created="2001-05-30 14:19:36" updated="2005-08-10 20:19:10">
<type id="11">
note</type>
<author id="43546">
chipmunk</author>
<data>
<field name="doctext">
My best was 59 characters:
&lt;code&gt;sub p {
map{$_[$_]+=$_[$_+1]for 0..$#_;@_=(1,@_);print"@_\n"}1..pop
}
&lt;/code&gt;
However, I can reduce japhy's solution from 56 to 45 characters:
&lt;code&gt;sub p {
@_=(1,map$_[-2]+pop,@_),print"@_\n"for 1..pop 
}
&lt;/code&gt;
BTW, I find it amusing that monks are giving their golf subroutines one-letter names, when the subroutine name isn't counted in the length of the solution.  :)
&lt;p&gt;
I was considering &lt;code&gt;sub pascal's_triangle {}&lt;/code&gt; for this one.  ;)</field>
<field name="root_node">
84150</field>
<field name="parent_node">
84171</field>
</data>
</node>
