On Mon, 26 Jul 2021, Marshall Lochbaum wrote:
Structural Under isn't always compatible with the existing Under.
The other examples you give are arguably mistakes, but here is one which
is not: >.
-&.>1 gives <_1; but the same sentence with structural under in place of
&. should give _1, ret
An alternative is to create modifiers for each of your examples
take =: (*@[ * |@[ <. #@:]) {. ]
forfirst =: 2 : '(v }. ]) ,~^:(0 < #@[) [ u v take ]'
-@] forfirst (1) 1 2 3
_1 2 3
3 - forfirst (4) 1 2 3
2 1 0
there is a definition for the obverse of {. (though it seems useless, as the
co
Yes, not all structural functions can be recognized (I use "well
defined" in the mathematical sense meaning that the definition never
allows two conflicting results for the same arguments; it's actually
sort of a complement to "defined").
In practice recognizing structural functions isn't difficul
Your concept of a structural function might be well defined
mathematically, but it's not clear to me that recognizing structural
functions could be efficiently implemented for the general case of
user defined structural functions.
I think this means that you wind up requiring the user to declare
w
This breaks existing uses of under, which means that you would need a
different token (or word) to represent structural under.
And, if you're doing that, it would make sense to define a new word to
represent "structural under".
But, also, this gets into issues of rank and depth and what is
intend
I'm the inventor(?) of structural Under. I won't comment on whether it
makes sense for J but can offer a little more context.
The operation is well defined: here's a specification with proof. It's
pretty difficult because it needs to support arbitrary paths into a
nested array, but would be much s
On Mon, 26 Jul 2021, Raul Miller wrote:
I think that the problem here would be in defining vu to work in your examples.
I definitely don't think that's the problem!
Here are some definitions; untested, but hopefully illustrative:
',': $@>@{. $ >@{:
'{.': >@{: , }.@>@{.
'}.': {.@>@{. , >
I think that the problem here would be in defining vu to work in your examples.
If you could do that, I think you would have something.
Without that, though, we would need a different approach.
Thanks,
--
Raul
On Mon, Jul 26, 2021 at 3:57 PM Elijah Stone wrote:
>
> 'Structural under' is an e
'Structural under' is an extension to under (&. &.:) that allows it to
operate on otherwise uninvertible structure-changing verbs. It is
implemented in dzaima/apl (https://github.com/dzaima/APL/).
For example:
-&.{. 1 2 3 4 NB. take the head, negate it, reaffix it to the rest of
the body