Difference between revisions of "APL Bridge Examples"
Jump to navigation
Jump to search
| Line 13: | Line 13: | ||
=Example: Pascal Triangle in APL= | =Example: Pascal Triangle in APL= | ||
| + | |||
[[https://en.wikipedia.org/wiki/APL_syntax_and_symbols Wiki Samples]] | [[https://en.wikipedia.org/wiki/APL_syntax_and_symbols Wiki Samples]] | ||
Pascal ← {' '@(0=⊢)↑0,⍨¨a⌽¨⌽∊¨0,¨¨a∘!¨a←⌽⍳⍵} ⍝ Create a one-line user function called Pascal | Pascal ← {' '@(0=⊢)↑0,⍨¨a⌽¨⌽∊¨0,¨¨a∘!¨a←⌽⍳⍵} ⍝ Create a one-line user function called Pascal | ||
| + | |||
Pascal 7 ⍝ Run function Pascal for seven rows and show the results below: | Pascal 7 ⍝ Run function Pascal for seven rows and show the results below: | ||
Revision as of 19:38, 13 February 2025
APL Bridge Examples
Refer to [| Simple APL Examples to try in Z]
For example, try:
'abcd' ∘.= 'cabbage'
Example: Pascal Triangle in APL
Pascal ← {' '@(0=⊢)↑0,⍨¨a⌽¨⌽∊¨0,¨¨a∘!¨a←⌽⍳⍵} ⍝ Create a one-line user function called Pascal
Pascal 7 ⍝ Run function Pascal for seven rows and show the results below: