News for hackers. Stuff that matters.
Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers by dxbydt on Thursday January 05, 2012 @03:57PM (#3430485)
Just an asie: Printing Pascal's triangle for upto 10 rows is trivial. The factorials don't get big enough so you can simply use binomial coefficients (like in your ruby solution). But if you want Pascal's triangle for the 10,000th row => You can use what I wrote. If you have an easier implementation, I'd be very interested.
Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers by it on Thursday January 05, 2012 @05:36PM (#3430911)
Here's a way to do it in Haskell:

let step row = zipWith (+) (0:row) (row++[0])

let triangle = iterate step [1]

take 10 triangle