Indices: Difference between revisions

Jump to navigation Jump to search
18 bytes added ,  19:25, 9 December 2019
m
no edit summary
mNo edit summary
Line 60: Line 60:
Indices (<source lang=apl inline>⍸</source>) was first introduced to APL, and the [[nested array model]], by [[NARS2000]]. Originally defined only for vectors, the generalised definition <source lang=apl inline>(,R)/,⍳⍴1/R</source> was introduced in about 2013 after some experimentation with alternatives.<ref>NARS2000 Wiki. [http://wiki.nars2000.org/index.php?title=Indices&direction=next&oldid=863 Indices]. Old revision: 2013-05-26.</ref> Where (<source lang=apl inline>⍸</source>), with almost the same definition, was added to [[Dyalog APL 16.0]] (June 2017), but with the restriction that the argument be Boolean, a restriction that was lifted to allow non-negative integers in [[Dyalog APL 18.0|18.0]] (2020). Dyalog's definition also returned <source lang=apl inline>I⍴⊂⍬</source> for <source lang=apl inline>⍸I</source> on a scalar <source lang=apl inline>I</source>, as opposed to NARS2000 which returned <source lang=apl inline>I⍴1</source>. In January 2018, NARS2000 switched to Dyalog's definition for scalar arguments; <source lang=apl inline>{(,⍵)⌿,⍳⍴⍵}</source>.
Indices (<source lang=apl inline>⍸</source>) was first introduced to APL, and the [[nested array model]], by [[NARS2000]]. Originally defined only for vectors, the generalised definition <source lang=apl inline>(,R)/,⍳⍴1/R</source> was introduced in about 2013 after some experimentation with alternatives.<ref>NARS2000 Wiki. [http://wiki.nars2000.org/index.php?title=Indices&direction=next&oldid=863 Indices]. Old revision: 2013-05-26.</ref> Where (<source lang=apl inline>⍸</source>), with almost the same definition, was added to [[Dyalog APL 16.0]] (June 2017), but with the restriction that the argument be Boolean, a restriction that was lifted to allow non-negative integers in [[Dyalog APL 18.0|18.0]] (2020). Dyalog's definition also returned <source lang=apl inline>I⍴⊂⍬</source> for <source lang=apl inline>⍸I</source> on a scalar <source lang=apl inline>I</source>, as opposed to NARS2000 which returned <source lang=apl inline>I⍴1</source>. In January 2018, NARS2000 switched to Dyalog's definition for scalar arguments; <source lang=apl inline>{(,⍵)⌿,⍳⍴⍵}</source>.


== Documentation ==
== External links ==
 
=== Lessons ===
 
[https://chat.stackexchange.com/transcript/52405?m=41724812#41724812 APL Cultivation]
 
=== Documentation ===


[http://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Where.htm Dyalog]
[http://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Where.htm Dyalog]
Line 67: Line 73:


J [https://www.jsoftware.com/help/dictionary/dicapdot.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/icapdot NuVoc]
J [https://www.jsoftware.com/help/dictionary/dicapdot.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/icapdot NuVoc]
== Other resources ==
[https://chat.stackexchange.com/transcript/52405?m=41724812#41724812 APL Cultivation]


== References ==
== References ==

Navigation menu