Take: Difference between revisions

Jump to navigation Jump to search
m
→‎History: Prefix and suffix vector link
m (→‎History: Prefix and suffix vector link)
 
Line 105: Line 105:
== History ==
== History ==


In [[A Programming Language]], [[prefix]] and [[suffix]] operations were described using the syntax <math>\alpha^j/x</math> to take the first <math>j</math> elements of vector <math>x</math> and <math>\omega^j/x</math> for the last <math>j</math> elements. This combined a use of the special prefix and suffix vectors <math>\alpha^j(n)</math> and <math>\omega^j(n)</math> with [[Compress|compression]], with the length <math>n</math> inferred based on the length of <math>x</math>. The symbol <math>\uparrow</math> was used for vector [[Rotate]], while <math>\downarrow</math> rotated in the opposite direction.<ref>[[Ken Iverson|Iverson, K.E.]] (1962). A Programming Language. Wiley. ISBN 978-0-471-43014-8.</ref> All these definitions appear in [[IVSYS/7090]], with adjustments to fit a linear syntax.
In [[A Programming Language]], [[prefix]] and [[suffix]] operations were described using the syntax <math>\alpha^j/x</math> to take the first <math>j</math> elements of vector <math>x</math> and <math>\omega^j/x</math> for the last <math>j</math> elements. This combined a use of the special [[prefix and suffix vectors]] <math>\alpha^j(n)</math> and <math>\omega^j(n)</math> with [[Compress|compression]], with the length <math>n</math> inferred based on the length of <math>x</math>. The symbol <math>\uparrow</math> was used for vector [[Rotate]], while <math>\downarrow</math> rotated in the opposite direction.<ref>[[Ken Iverson|Iverson, K.E.]] (1962). A Programming Language. Wiley. ISBN 978-0-471-43014-8.</ref> All these definitions appear in [[IVSYS/7090]], with adjustments to fit a linear syntax.


The first version of [[APL\360]]<ref>[[Adin Falkoff|Falkoff, A.D.]], and [[Ken Iverson|K.E. Iverson]]. [https://www.jsoftware.com/papers/APL360TerminalSystem.htm "The APL\360 Terminal System"]. Research Report RC-1922, IBM, 1967-10-16.</ref> followed Iverson notation in defining prefix (<syntaxhighlight lang=apl inline>n ⍺ j</syntaxhighlight>) and suffix (<syntaxhighlight lang=apl inline>n ⍵ j</syntaxhighlight>) vectors but not Take, even though the arrow symbols were no longer used for Rotate. For a vector <syntaxhighlight lang=apl inline>x</syntaxhighlight>, what is now <syntaxhighlight lang=apl inline>j↑x</syntaxhighlight> would have been written <syntaxhighlight lang=apl inline>((⍴x)⍺j)/x</syntaxhighlight> while <syntaxhighlight lang=apl inline>(-j)↑x</syntaxhighlight> would be <syntaxhighlight lang=apl inline>((⍴x)⍵j)/x</syntaxhighlight>. The functions Take and Drop using arrow symbols were introduced by 1968.<ref>[[Adin Falkoff|Falkoff, A.D.]], and [[Ken Iverson|K.E. Iverson]], "[http://keiapl.org/archive/APL360_UsersMan_Aug1968.pdf APL\360 User's Manual]". [[IBM]], August 1968.</ref> They were implemented for arrays (not just vectors), and extended to allow the left argument to be larger than the right argument's shape (introducing overtaking and [[fill element]]s) in 1970.<ref>"[[IBM|I.B.M.]] Report". [[APL Quote-Quad]] Volume 2, Number 1. 1970-04.</ref>
The first version of [[APL\360]]<ref>[[Adin Falkoff|Falkoff, A.D.]], and [[Ken Iverson|K.E. Iverson]]. [https://www.jsoftware.com/papers/APL360TerminalSystem.htm "The APL\360 Terminal System"]. Research Report RC-1922, IBM, 1967-10-16.</ref> followed Iverson notation in defining prefix (<syntaxhighlight lang=apl inline>n ⍺ j</syntaxhighlight>) and suffix (<syntaxhighlight lang=apl inline>n ⍵ j</syntaxhighlight>) vectors but not Take, even though the arrow symbols were no longer used for Rotate. For a vector <syntaxhighlight lang=apl inline>x</syntaxhighlight>, what is now <syntaxhighlight lang=apl inline>j↑x</syntaxhighlight> would have been written <syntaxhighlight lang=apl inline>((⍴x)⍺j)/x</syntaxhighlight> while <syntaxhighlight lang=apl inline>(-j)↑x</syntaxhighlight> would be <syntaxhighlight lang=apl inline>((⍴x)⍵j)/x</syntaxhighlight>. The functions Take and Drop using arrow symbols were introduced by 1968.<ref>[[Adin Falkoff|Falkoff, A.D.]], and [[Ken Iverson|K.E. Iverson]], "[http://keiapl.org/archive/APL360_UsersMan_Aug1968.pdf APL\360 User's Manual]". [[IBM]], August 1968.</ref> They were implemented for arrays (not just vectors), and extended to allow the left argument to be larger than the right argument's shape (introducing overtaking and [[fill element]]s) in 1970.<ref>"[[IBM|I.B.M.]] Report". [[APL Quote-Quad]] Volume 2, Number 1. 1970-04.</ref>

Navigation menu