Difference between revisions of "APL Bridge Examples"
(Created page with "=APL Bridge Examples= Refer to https://aplwiki.com/wiki/Simple_examples For example, try: 'abcd' ∘.= 'cabbage'") |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
=APL Bridge Examples= | =APL Bridge Examples= | ||
| − | Refer to [[https://aplwiki.com/wiki/Simple_examples]] | + | Refer to [[https://aplwiki.com/wiki/Simple_examples | Simple APL Examples to try in Z]] |
For example, try: | For example, try: | ||
'abcd' ∘.= 'cabbage' | 'abcd' ∘.= 'cabbage' | ||
| + | |||
| + | |||
| + | [[File:Apl1.png|500px|String Inspection]] | ||
| + | |||
| + | [[File:Apl2.png|500px|Pascal Triangle]] | ||
| + | |||
| + | =Example: Pascal Triangle in APL= | ||
| + | |||
| + | [[https://en.wikipedia.org/wiki/APL_syntax_and_symbols Wiki Samples]] | ||
| + | |||
| + | <pre> | ||
| + | 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: | ||
| + | </pre> | ||
Latest revision as of 19:39, 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: