Disclose: Difference between revisions

Jump to navigation Jump to search
1 byte added ,  12:33, 1 May 2020
m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
{{Built-in|Disclose|⊃}} or '''Reveal''' is a [[monadic function]] in [[Nested array model|nested]] APLs which reduces the level of nesting of an array. Early experiments in array nesting usually defined a primitive to extract the contents of a nested [[scalar]], but did not always specify how it should behave on an array. [[Jim Brown]]'s "A Generalization of APL",<ref>[[Jim Brown]]. [http://www.softwarepreservation.org/projects/apl/Books/AGENERALIZATIONOFAPL "A Generalization of APL"] (Ph.D. thesis). 1971.</ref> stated that it "may be undefined" on non-scalar arrays. However, all dialects do define it on non-scalars, but with differing definitions. Some dialects, for example [[Dyalog APL]], have it extract the argument's initial element in [[ravel order]], while others, for example [[APL2]] have it combine the array's elements (requiring conforming shapes or padding with [fill element]]s). Depending on which approach is taken, it is recommended to use the unambiguous names [[First]] and [[Mix]] for these two functions.
{{Built-in|Disclose|⊃}} or '''Reveal''' is a [[monadic function]] in [[Nested array model|nested]] APLs which reduces the level of nesting of an array. Early experiments in array nesting usually defined a primitive to extract the contents of a nested [[scalar]], but did not always specify how it should behave on an array. [[Jim Brown]]'s "A Generalization of APL",<ref>[[Jim Brown]]. [http://www.softwarepreservation.org/projects/apl/Books/AGENERALIZATIONOFAPL "A Generalization of APL"] (Ph.D. thesis). 1971.</ref> stated that it "may be undefined" on non-scalar arrays. However, all dialects do define it on non-scalars, but with differing definitions. Some dialects, for example [[Dyalog APL]], have it extract the argument's initial element in [[ravel order]], while others, for example [[APL2]] have it combine the array's elements (requiring conforming shapes or padding with [[fill element]]s). Depending on which approach is taken, it is recommended to use the unambiguous names [[First]] and [[Mix]] for these two functions.


For a discussion of all uses of the [[glyph]] <code>⊃</code>, see [[Right Shoe]].
For a discussion of all uses of the [[glyph]] <code>⊃</code>, see [[Right Shoe]].

Navigation menu