Pascal's triangle: Difference between revisions
Content added Content deleted
(Updated Dyalog APL's answer/example to format Pascal's Triangle better) |
Not a robot (talk | contribs) m (→{{header|APL}}: fix subheaders) |
||
Line 311: | Line 311: | ||
=={{header|APL}}== |
=={{header|APL}}== |
||
Pascal' s triangle of order ⍵ |
Pascal' s triangle of order ⍵ |
||
⚫ | |||
⚫ | |||
<lang apl> |
<lang apl> |
||
{⍕0~¨⍨(-⌽A)⌽↑,/0,¨⍉A∘.!A←0,⍳⍵} |
{⍕0~¨⍨(-⌽A)⌽↑,/0,¨⍉A∘.!A←0,⍳⍵} |
||
Line 332: | Line 330: | ||
1 5 10 10 5 1 |
1 5 10 10 5 1 |
||
</pre> |
</pre> |
||
⚫ | |||
⚫ | |||
GNU APL doesn't allow multiple statements within lambdas so the solution is phrased differently: |
GNU APL doesn't allow multiple statements within lambdas so the solution is phrased differently: |
||