Codegolf: Pascal's Triangle

Hi all!

I’ve been quite addicted to for a while and I’m trying
to skim down my Pascal’s Triangle program. The challenge description is
here: I’m currently at 84 bytes,
but some awesome ruby coders have done it in 43 bytes! Take a look at
the code and let me know if there’s anything glaringly obvious I could
do the reduce character count. New lines have been added for
readability, there are no new lines in the true code.

def f(n)

puts((0…i).map{|j|f(i)/(f(j)f(i-j))}’ ')

On 1/25/07, Drew O. [email protected] wrote:

There must be a solution with 42 characters, it’s a well known law :wink:

On 1/25/07, Erik V. [email protected] wrote:

Ok if I cannot have 42 I will accept 42+42, why not?


Not again… ;]

Ruby Quiz - pp Pascal (#84)

Erik V. -