Symbol Reduce: Difference between revisions

From NARS2000
Jump to navigationJump to search
m (Paul Robinson moved page Symbol Slash to Symbol Reduce: move to function)
No edit summary
Line 1: Line 1:
__NOTOC__
<h1> {compress} &mdash; Reduce/compress/replicate Operator &mdash; Keystroke / &mdash; Character 93 or x5D</h1>
<h1> {compress} &mdash; Reduce Operator &mdash; Keystroke ?ALT+X &mdash; Character 0000</h1>
Note: The APL name of this symbol is <big>compress</big> or '''&#123;compress}''', not '''reduce''', however, reduce or reduction is the usual name for this symbol, but compress is one of the functions.  
Note: The APL name of this symbol is <big>compress</big> or '''&#123;compress}''', not '''reduce'''.


This symbol performs several different operations depending on whether it is combined with certain other operators
=Functions=
*L / R compress or replicate R according to value in L
* f/ R reduce operator f on each argument in R
==Compress / Replicate==
The argument on the left selects the elements on the right to discard, keep, or copy. For each element on the right there is a numeric value on the left indicating how many copies of that element on the right to keep. The number of elements must match. If the number is 0, that element is dropped. If 1, it is kept. If >1, it is copied that many times.
===Usage===
<code>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 1 0 0 0 0 0 0 0 0 0 0 1 1 / 'Taste the cake'<br/>
Take<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 1 0 0 0 0 0 0 0 0 0 0 1 1 / 'Taste the cake'<br/>
TTake<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 0 0 1 1/ 1 2 3 4 5<br/>
1 4 5
</code>
==Reduce==
The operator to the left of the reduce operator is applied to the values to the right. These operators include
* !/ Factorial reduce
* -/ Minus reduce
* +/ Plus reduce
* ×/ Times reduce
* */ Star reduce
* ⍟/ Log reduce
* ○/ Jot reduce
* ∨/ Or reduce
* ∧/ And reduce
* ⍱/ Nor reduce
* ⍲/ Nand reduce
* ⌈/ Maximum
* ⌊/ Minimum
* =/
* ≠/
* ≤/
* </
* >/
* ≥/
==Usage==
==Usage==
==Example==
==Example==
==See Also==
==See Also==

Revision as of 02:18, 13 March 2013

/ — Reduce/compress/replicate Operator — Keystroke / — Character 93 or x5D

Note: The APL name of this symbol is compress or {compress}, not reduce, however, reduce or reduction is the usual name for this symbol, but compress is one of the functions.

This symbol performs several different operations depending on whether it is combined with certain other operators

Functions

  • L / R compress or replicate R according to value in L
  • f/ R reduce operator f on each argument in R

Compress / Replicate

The argument on the left selects the elements on the right to discard, keep, or copy. For each element on the right there is a numeric value on the left indicating how many copies of that element on the right to keep. The number of elements must match. If the number is 0, that element is dropped. If 1, it is kept. If >1, it is copied that many times.

Usage

     1 1 0 0 0 0 0 0 0 0 0 0 1 1 / 'Taste the cake'
Take
     2 1 0 0 0 0 0 0 0 0 0 0 1 1 / 'Taste the cake'
TTake
     1 0 0 1 1/ 1 2 3 4 5
1 4 5

Reduce

The operator to the left of the reduce operator is applied to the values to the right. These operators include

  • !/ Factorial reduce
  • -/ Minus reduce
  • +/ Plus reduce
  • ×/ Times reduce
  • */ Star reduce
  • ⍟/ Log reduce
  • ○/ Jot reduce
  • ∨/ Or reduce
  • ∧/ And reduce
  • ⍱/ Nor reduce
  • ⍲/ Nand reduce
  • ⌈/ Maximum
  • ⌊/ Minimum
  • =/
  • ≠/
  • ≤/
  • </
  • >/
  • ≥/

Usage

Example

See Also

NARS 2000 Lang
Tool
Bar
+ - × ÷ * ! ? |
< = >
~ § π .. ,
/ \ ¨ .
_ ¯
Second Row i j k i j k l g p r v x