Array model: Difference between revisions

Jump to navigation Jump to search
2 bytes added ,  09:07, 29 October 2019
m
Text replacement - "</code>" to "</source>"
Miraheze>Adám Brudzewsky
m (Text replacement - "<code>" to "<source lang=apl inline>")
Miraheze>Adám Brudzewsky
m (Text replacement - "</code>" to "</source>")
Line 83: Line 83:
In nested APLs, a simple non-scalar array has depth 1, an array containing only depth 1 arrays has depth 2, and a simple scalar (e.g a number or character) has depth 0.
In nested APLs, a simple non-scalar array has depth 1, an array containing only depth 1 arrays has depth 2, and a simple scalar (e.g a number or character) has depth 0.


Most APLs provide a Depth function <source lang=apl inline>≡</code> to find an array's depth. For example:
Most APLs provide a Depth function <source lang=apl inline>≡</source> to find an array's depth. For example:
<source lang=apl>
<source lang=apl>
       ≡('ab' 'cde')('fg' 'hi')
       ≡('ab' 'cde')('fg' 'hi')

Navigation menu