Pascal's triangle: Difference between revisions

m
Line 1,924:
No result if n <= 0
 
<lang Oforth>func: pascal(n) { [ 1 ] #[ dup println dup 0 + 0 rot + zipWith(#+) dup println ] times(n) drop }</lang>
 
{{out}}
<pre>
pascal(10)
[1]
[1, 1]
[1, 2, 1]
Line 1,938 ⟶ 1,939:
[1, 8, 28, 56, 70, 56, 28, 8, 1]
[1, 9, 36, 84, 126, 126, 84, 36, 9, 1]
[1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1]
</pre>
 
1,015

edits