All--
Each non-assigment step in a computation produces copies(!) of its inputs, 
selected and arranged in various specified ways, awaiting disposition--in 
another step, in assignment to storage, in output, or in discard.

At the very least, any recipe for processing an array should begin with some 
version of "Take a copy of y, then...", and consistently refer to that copy, 
rather than to y.

As an example, the page for Nub currently contains the following statements:
  Removes duplicates from a list 
<https://code.jsoftware.com/wiki/Vocabulary/AET#List>.

  More generally, removes any item 
<https://code.jsoftware.com/wiki/Vocabulary/AET#Item> of an array 
<https://code.jsoftware.com/wiki/Vocabulary/AET#Array> that matches a preceding 
item.

  1. Remove duplicate values 
<https://code.jsoftware.com/wiki/Vocabulary/Glossary#Value> from a lis 
<https://code.jsoftware.com/wiki/Vocabulary/AET#List>t

  2. Remove duplicate rows from a table 
<https://code.jsoftware.com/wiki/Vocabulary/AET#Table>
I recommend replacing them with:
  Copies items from a list, omitting duplicates.
  More generally, omits any item 
<https://code.jsoftware.com/wiki/Vocabulary/AET#Item> of an array 
<https://code.jsoftware.com/wiki/Vocabulary/AET#Array> that matches a preceding 
item.
  1. Omit duplicate values 
<https://code.jsoftware.com/wiki/Vocabulary/Glossary#Value> from a lis 
<https://code.jsoftware.com/wiki/Vocabulary/AET#List>t
  2. Omit duplicate rows from a table 
<https://code.jsoftware.com/wiki/Vocabulary/AET#Table>

The language used to describe a verb often suggests that its result will 
somehow replace the values being operated on, which will be (nearly) accurate 
only if followed immediately by re-assignment to the same, named, argument.

I urge that any new documentation observe this distinction, and that any 
definition being updated follow this pattern.  If there is a consensus that 
this is a worthy cause, I shall be willing to propose such changes where I may 
encounter them in coming months.
--Art



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to