"APL Object Notation" in Dyalog APL

Viewed 418

How to convert any Dyalog APL value to a character vector that could be passed to ⍎ to get the same value?

How this is expected to look like:

      x←2 3⍴⍳6
      x←1,⊂x
      x←x,⊂'foo'
      y←desired_function x
      DPX y
┌→─────────────────┐
│1,(⊂2 3⍴⍳6),⊂'foo'│
└──────────────────┘
      x≡⍎y
1

Update

The idea is to convert a value to a human-editable APL source code to be able to insert it to a unit test function, when a new problematic scenario has been found. I want those test scenarios to be in APL source code, not in files, because in a framework I work with, source code is nicely managed by a version control system, while files are not. And I want it to be human-editable, not just serialized, to make it easier to amend existing test scenarios when arguments/results change.

5 Answers
Related