You are viewing a single comment's thread. Return to all comments →
Bases on your solutions and adding a bit of my own, I think this might be the shorstest way to solve this, using just the Prelude:
main=interact$unlines.map (unwords.(map show)).flip take s.read s=[1]:map ((1:).(++[1]).(zipWith (+)=<<tail)) s
Seems like cookies are disabled on this browser, please enable them to open this website
Pascal's Triangle
You are viewing a single comment's thread. Return to all comments →
Bases on your solutions and adding a bit of my own, I think this might be the shorstest way to solve this, using just the Prelude: