4,494
edits
m (→Introduction) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
For left argument <syntaxhighlight lang=apl inline>⍺</syntaxhighlight> and right argument <syntaxhighlight lang=apl inline>⍵</syntaxhighlight>, | For left argument <syntaxhighlight lang=apl inline>⍺</syntaxhighlight> and right argument <syntaxhighlight lang=apl inline>⍵</syntaxhighlight>, | ||
<syntaxhighlight lang=apl> | <syntaxhighlight lang=apl> | ||
⍤ c ⍝ Depth-c | ⍤ c ⍝ Depth-c sub-arrays of ⍵ (monadic) or both arguments (dyadic) | ||
⍤ b c ⍝ Depth-b | ⍤ b c ⍝ Depth-b sub-arrays of ⍺ and depth-c sub-arrays of ⍵ (dyadic) | ||
⍤a b c ⍝ Depth-a | ⍤a b c ⍝ Depth-a sub-arrays of ⍵ (monadic), depth-b sub-arrays of ⍺ and depth-c sub-arrays of ⍵ (dyadic) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 44: | Line 44: | ||
└──────────┴───┘ | └──────────┴───┘ | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Con[[catenate]] a constant prefix to each element: | Con[[catenate]] a constant prefix to each element: | ||
Line 56: | Line 55: | ||
Pair up the elements on the left with each element of each element on the right. | Pair up the elements on the left with each element of each element on the right. | ||
<syntaxhighlight lang=apl> | <syntaxhighlight lang=apl> | ||
'xy', | 'xy',⍥¯1⍥¯1⊢('ab' 'cd')('AB' 'CD') ⍝ equivalent to (⊂'xy'),¨¨('ab' 'cd')('AB' 'CD') | ||
┌─────────┬─────────┐ | ┌─────────┬─────────┐ | ||
│┌───┬───┐│┌───┬───┐│ | │┌───┬───┐│┌───┬───┐│ | ||
Line 70: | Line 69: | ||
=== Publications === | === Publications === | ||
* [[dfns workspace]]: [https://dfns.dyalog.com/n_Depth.htm Depth] | * [https://github.com/abrudz/primitives/blob/main/depth.aplo APL model] | ||
* [[dfns workspace]]: [https://dfns.dyalog.com/n_Depth.htm Depth] (this model does not correspond to the final design) | |||
{{APL built-ins}}[[Category:Primitive operators]] | {{APL built-ins}}[[Category:Primitive operators]] |