<p><a href="http://apl2000.com/APL64/UserDocumentation/APL64_SYSTEM_FUNCTION.pdf#page=52" rel="nofollow noreferrer">APL64 includes a <code>⎕DTR</code> system function</a> which, as far as I can tell, is equivalent to <code>⍉¨⍉</code> i.e. the transposed outer array with each element also being transposed.*</p>
<p>What is the use case for such a built-in, and why not just use the primitives? A possible answer could for example be that computation of the final result can be optimised more than doing separate transposes.</p>
<hr />
<p><sup>* Note that the documentation says the &quot;result is an array with the same rank and shape&quot;, but this is clearly contradicted by the shown example, and thus appears to be a mistake.</sup></p>

<language-design><apl>
Why would an APL implementation include "Deep Transpose"?
CC BY-SA 4.0
2023-06-20T15:47:20.527Z
Why the downvote?
Adám
CC BY-SA 4.0
2023-06-21T04:03:51.960Z
To me it seems more like `{IsSimple ⍵: ⍉⍵ ⋄ ⍉∇¨⍵}`.
Bubbler
CC BY-SA 4.0
2023-06-21T04:31:11.380Z
@Bubbler Ah, that could be, and since APL64 doesn't have dfns, it'd be slightly more awkward to write that. (Btw, `IsSimple` is `1≥≡`)
Adám
CC BY-SA 4.0
2023-08-15T22:56:11.223Z
I found a [changelist](http://www.lescasse.com/Content/NewAplwinFeatures.aspx) entry saying 'This System Function is very useful when passing arrays to an ActiveX method as arrays needs to be deeply transposed in that case.'  Not very illuminating, but seems worth mentioning.
Moonchild
# Why would an APL implementation include "Deep Transpose"?
Posted by: username_0 on 2023-06-20
[APL64 includes a `⎕DTR` system function](http://apl2000.com/APL64/UserDocumentation/APL64_SYSTEM_FUNCTION.pdf#page=52) which, as far as I can tell, is equivalent to `⍉¨⍉` i.e. the transposed outer array with each element also being transposed.\*

What is the use case for such a built-in, and why not just use the primitives? A possible answer could for example be that computation of the final result can be optimised more than doing separate transposes.

---

\* Note that the documentation says the "result is an array with the same rank and shape", but this is clearly contradicted by the shown example, and thus appears to be a mistake.
**Tags:** language-design apl
> **Comments:**
> **username_0**: Why the downvote?  
> **username_1**: To me it seems more like `{IsSimple ⍵: ⍉⍵ ⋄ ⍉∇¨⍵}`.  
> **username_0**: @Bubbler Ah, that could be, and since APL64 doesn't have dfns, it'd be slightly more awkward to write that. (Btw, `IsSimple` is `1≥≡`)  
> **username_2**: I found a [changelist](http://www.lescasse.com/Content/NewAplwinFeatures.aspx) entry saying 'This System Function is very useful when passing arrays to an ActiveX method as arrays needs to be deeply transposed in that case.'  Not very illuminating, but seems worth mentioning.  
---
## 0 answers
