I think that fork construction needs to involve some semantic
mechanism which carries the requisite verbs to their desired
destinations.
J's conjunctions can accept two verb arguments and create a single
result. A fork contains three verbs. So I think that fork construction
using conjunctions must happen "in stages", with some sort of
intermediate result to "bridge the gap". And, since two verb trains
are hooks and not that intermediate result, we need some kind of
workaround.
That said, a conjunction which combines two verbs to create a hook and
another conjunction which takes a verb and a hook and creates the
analogous fork sound plausibly interesting. (Though the left-to-right
character of conjunction parsing is slightly discouraging, here.)
Alternatively, consider:
cfork=:{{
'`u n'=. m
u n v
}}
+/`% cfork #
+/ % #
+/`% cfork # 1 2 3
2
I hope this makes sense,
--
Raul
On Wed, Sep 29, 2021 at 4:51 PM Elijah Stone <[email protected]> wrote:
>
> On Wed, 29 Sep 2021, Henry Rich wrote:
>
> > This is not a fork.
>
> Damn. You are right. I have convinced myself that there is no (sensible)
> definition of ].. and [.. that makes f ].. g [.. h a fork in the dyadic
> case. (Monadic is doable, but where's the fun in that?)
>
>
> > Your proposal for (C0 C1 C2) -> conj ((u C0 v) (u C1 v) (u C2 v))
>
> I have tried very hard to avoid proposing that--it seems I need to try
> harder!
>
> What I want is not to change the behaviour of C0C1C2; what I want is,
> _given_ some C0, C1, and C2, to be able to arrange them into some tacit
> conjunction such that u conj v -> ((u C0 v) (u C1 v) (u C2 v)). But that
> arrangement should not be C0C1C2, it should be something else.
>
> I had hoped it could be C0 ].. C1 [.. C2, but it seems there is no way to
> make that work. And I am out of ideas.
>
> -E
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm