Disclose: Difference between revisions

Jump to navigation Jump to search
545 bytes added ,  12:27, 1 May 2020
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
{{Built-in|Disclose|⊃}} is a [[monadic function]] is [[Nested array model|nested]] APLs which reduces the level of nesting of an array. However, its treatment of non-scalars varies between dialects. Some dialects have it extract the argument's initial element in [[ravel order]], while others have it combine the array's elements (requiring conforming shapes or padding with [fill element]]s). Depending on which approach is taken, it is common 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]].
 
== References ==
<references/>
{{APL built-ins}}[[Category:Primitive functions]]
{{APL built-ins}}[[Category:Primitive functions]]

Navigation menu