Tracy Harms wrote:

> [: would also be excluded; I'm sure John left it out only as an oversight.
>
> What John's looking for, I think, are "natural" examples where the
> dyadic fork applies.

This is right on the money.  It is very easy to come up with monadic
forks.  Most dyadic forks seem degenerate, in that one of the tines is
only applied to one argument.  For example:

cap=:e. # [

   1 2 3 4 cap 4 3 5 6
3 4

This is the intersection of two lists, in the order of the LHA.  The fork
is of the form (x f y ) g (y).

The verb proj defines the projection of y onto x:

mp=:+/ .*
norm=:[: %: mp~
proj=:mp % n...@[

   3 4 proj 1 1
1.4

Here proj has the form (x f y) g (h x).

What I was trying to get at is that most dyadic forks one can think of do
not use the full generality (x f y) g (x h y), and I was seeking "natural"
examples which do.

Best wishes,

John

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to