Unique: Difference between revisions

Jump to navigation Jump to search
18 bytes removed ,  14:45, 16 March 2020
no edit summary
No edit summary
Line 68: Line 68:
Iverson continued to refine his definition of Nub. He included it in his [[Rationalized APL]] specification with no changes in 1983, but modified it to work on [[major cell]]s (thus aligning it with [[leading axis theory]]) in his 1987 [[A Dictionary of APL]]. Iverson's dictionary also changed the symbol for Nub to <source lang=apl inline>↑</source>, added the functions [[Nub Sieve]] (<source lang=apl inline>≠</source>) and [[Nub in]] (<source lang=apl inline>=</source>), and defined Nub in terms of Nub Sieve. These definitions were adopted by [[IPSA]] in the [[SHARP APL]] successor [[SAX]]. [[J]] uses similar definitions: its Nub-related functions are Nub (<source lang=j inline>~.</source>), [[Nub Sieve]] (<source lang=j inline>~:</source>), and [[Self-Classify]] (<source lang=j inline>=</source>). However, Self-Classify is indicated as deprecated in J's NuVoc because its result can be much larger than its argument.
Iverson continued to refine his definition of Nub. He included it in his [[Rationalized APL]] specification with no changes in 1983, but modified it to work on [[major cell]]s (thus aligning it with [[leading axis theory]]) in his 1987 [[A Dictionary of APL]]. Iverson's dictionary also changed the symbol for Nub to <source lang=apl inline>↑</source>, added the functions [[Nub Sieve]] (<source lang=apl inline>≠</source>) and [[Nub in]] (<source lang=apl inline>=</source>), and defined Nub in terms of Nub Sieve. These definitions were adopted by [[IPSA]] in the [[SHARP APL]] successor [[SAX]]. [[J]] uses similar definitions: its Nub-related functions are Nub (<source lang=j inline>~.</source>), [[Nub Sieve]] (<source lang=j inline>~:</source>), and [[Self-Classify]] (<source lang=j inline>=</source>). However, Self-Classify is indicated as deprecated in J's NuVoc because its result can be much larger than its argument.


[[A+]] does not include Unique or any related functions, but [[K]]'s function range (<source lang=k inline>?</source>) gives the unique elements of a list argument. In later versions it is called "distinct" or "unique". While APLs allow a [[scalar]] argument ([[scalar rank extension]]), K gives a [[RANK ERROR]] if the argument is not a list.
[[A+]] does not include Unique or any related functions, but [[K]]'s function range (<code>?</code>) gives the unique elements of a list argument. In later versions it is called "distinct" or "unique". While APLs allow a [[scalar]] argument ([[scalar rank extension]]), K gives a [[RANK ERROR]] if the argument is not a list.


== APL model ==
== APL model ==

Navigation menu