(Per my thread recollection)
Raul mentioned that both valences should show.
Ian hoped for a correct solution 95% of the time.
This particular verb is interesting as a dyad because bond causes
repetition. Would we expand as some awful for. loop?
foo_explicated=: 3 : 0
NB. ((+/) % #) @ ((,&1)"1)
u=: 3 : '(+/ y) % (# y)' NB. [rank: _ _ _] (+/) % #
v=: (3 : 'y , 1')"1 NB. [rank: 1 1 1] (,&1)"1
w=: u@v NB. [rank: 1 1 1] ((+/) % #) @
((,&1)"1)
w y
:
u=. 3 : '(+/ y) % (# y)' NB. [rank: _ _ _] (+/) % #
v=. ((,&1)"1) NB. difficult to explain here. ************
w=. u@v
x w y
)
> Date: Wed, 25 Jul 2012 15:51:41 +0100
> From: Ian Clark <[email protected]>
> To: [email protected]
> Subject: Re: [Jprogramming] fully parenthesized representation of a
> tacit verb
> Message-ID:
> <CAB2g=gdh7tky7s3btkmfv9irh9zmkyuh84rsauouifknjbh...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> The trouble is, deducing the rank of u@v knowing the ranks of the
> verbs u and v is not easy to explicate (if at all) by passing a single
> intermediate noun (z) from v to u. My solution was a fudge. I guess
> foo is best explained -- and understood -- by assigning intermediate
> verbs instead of nouns. (Or: as well as nouns.) I guess Linda is
> making the same point.
>
> So here's a clearer explication, and hopefully a more accurate one:
>
> foo_explicated=: 3 : 0
> NB. ((+/) % #) @ ((,&1)"1)
> u=: 3 : '(+/ y) % (# y)' NB. [rank: _ _ _] (+/) % #
> v=: (3 : 'y , 1')"1 NB. [rank: 1 1 1] (,&1)"1
> w=: u@v NB. [rank: 1 1 1] ((+/) % #) @
> ((,&1)"1)
> w y
> )
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm