> >  ([0]+row).zip(row<<0).map{|a,b|a+b}    ===> [1, 4, 6, 4, 1]
>
> Actually, you can save two characters by a simple variation
> on the initial zip version that removes the need for parens,
> with no in-place modification of "row":
>
>    row.zip([0]+row).map{|a,b|a+b}+[1]

 row    = [1, 4, 6, 4, 1]
 p ([0]+row).zip(row<<0).map{|a,b|a+b}  ===> [1, 5, 10, 10, 5, 1]
 p row.zip([0]+row).map{|a,b|a+b}+[1]   ===> [1, 5, 10, 10, 5, 1, 1]

Different results...

> > You could build and store the complete triangle with this:
> >
> >  t=[r=[1]]+(2..n).map{r=([0]+r).zip(r+[0]).map{|a,b|a+b}}
>
> Minimal-number-of-characters-wise, at this point you're
> better off not using the pascal triangle recurrence relation
> and just using the properties of binomial coefficients:
>
>    t=(0..n).map{|i|r=1;[1]+(1..i).map{|a|r=r*(i+1-a)/a}}

Add one extra dot (0...n instead of 0..n) and you win!

gegroet,
Erik V. - http://www.erikveen.dds.nl/