[x] u&:v y Appose Conjunction
Applies verb v to each argument in its entirety, and then applies verb u to the result(s) of v
u =: < NB. x is smaller than y v =: | NB. magnitude csm =: +/ @: u &: v NB. Count how many x's are smaller than y in magnitude _1 2 0 csm 2 _3 0 2
- Verb v is executed monadically.
- Verb u is executed either monadically or dyadically depending whether u&:v has been called monadically or dyadically .
1. u&:v is called for when the rank of v is less than the ranks of an argument, but you want to apply u to the entire result of v.
In the csm example above, we needed (&:) not (&)
_1 2 0 +/@:<&:| 2 _3 0 NB. "csm" example as an anonymous verb in a 1-liner 2 _1 2 0 +/@:<&| 2 _3 0 NB. different result using (&) in place of (&:) 1 1 0
Because | y has rank 0, the entire compound +/@:<&| is applied to each atom of x and y, making the +/ useless since it now operates on each atom individually.
1. Contrast Appose (u&:v) with Compose (u&v) which applies v to individual cell(s) and then applies u on the individual result(s) of v
2. The difference between Appose (u&:v) and Compose (u&v) is shown in the last two columns of the diagram below:
None at all, for the monads (u@v) and (u&v)
u&v y ↔ u v y u@v y ↔ u v y
But the dyads are different
x u&v y ↔ (v x) u (v y) x u@v y ↔ u x v y
According to the J Dictionary -- &: is equivalent to & except that the ranks of the resulting function are infinite; the relation is similar to that between @: and @