Function/Operator/Hyperator Assignment: Difference between revisions

From NARS2000
Jump to navigationJump to search
No edit summary
No edit summary
Line 4: Line 4:
     <table border="0" cellpadding="5" cellspacing="0" summary="">
     <table border="0" cellpadding="5" cellspacing="0" summary="">
     <tr>
     <tr>
       <td><apl size="large">A←<i>fn</i></apl></td>
       <td><apll>A←<i>fn</i></apll></td>
       <td></td>
       <td></td>
       <td></td>
       <td></td>
       <td>assigns the function <i>fn</i> to <apl size="large">A</apl>.</td>
       <td>assigns the function <i>fn</i> to <apll>A</apll>.</td>
     </tr>
     </tr>
     <tr>
     <tr>
       <td><apl size="large">A←<i>op1<i></apl></td>
       <td><apll>A←<i>op1<i></apll></td>
       <td></td>
       <td></td>
       <td></td>
       <td></td>
       <td>assigns the monadic operator <i>op1</i> to <apl size="large">A</apl>.</td>
       <td>assigns the monadic operator <i>op1</i> to <apll>A</apll>.</td>
     </tr>
     </tr>
     <tr>
     <tr>
       <td><apl size="large">A←<i>op2<i></apl></td>
       <td><apll>A←<i>op2<i></apll></td>
       <td></td>
       <td></td>
       <td></td>
       <td></td>
       <td>assigns the dyadic operator <i>op2</i> to <apl size="large">A</apl>.</td>
       <td>assigns the dyadic operator <i>op2</i> to <apll>A</apll>.</td>
     </tr>
     </tr>
     </table>
     </table>
Line 25: Line 25:
</tr>
</tr>
<tr>
<tr>
   <td><apl size="large">A</apl> is an assignable name, <i>fn</i>, <i>op1</i>, and <i>op2</i> are an arbitrary function, monadic or dyadic operator.
   <td><apll>A</apll> is an assignable name, <apll><i>fn</i></apll>, <apll><i>op1</i></apll>, and <apll><i>op2</i></apll> are an arbitrary function, monadic or dyadic operator.
   </td>
   </td>
</tr>
</tr>
Line 31: Line 31:
<br />
<br />
<br />
<br />
For example, the function <apl size="large">F←⍴∘⍴¨</apl> when applied to an array, returns the rank of each item.
For example, the function <apll>F←⍴∘⍴¨</apll> when applied to an array, returns the rank of each item.

Revision as of 22:38, 9 April 2008

A←fn assigns the function fn to A.
A←op1 assigns the monadic operator op1 to A.
A←op2 assigns the dyadic operator op2 to A.
A is an assignable name, fn, op1, and op2 are an arbitrary function, monadic or dyadic operator.



For example, the function F←⍴∘⍴¨ when applied to an array, returns the rank of each item.