Well, may be I'm not clear enough?
The need for zeroing negative values
is part of a longer J-sentence. I have a solution
for all that. It looks like:
G=: <more actions> <zeroing negative values> <RH actions>
y*(0<:y) or (0<:y)*y
So y is the result of the RH actions and after zeroing
it has to be processed further.
My implementation of the zeroing process
is translated to one of the following:
1) (*0<:]) y
2) (*0&<:) y
3) (0&<:*]) y
I'm interested in a sort of reasoning how
to compose one the variants and choosing a
preferred one. That's why I put the questions
at the end.
i. should I prefer no. 2 (as I do BTW),
f.e. in a way of elegance, more tacit ?
ii. 2 and 3 are hooks: dyadic 0<:y becomes monadic 0&<:y
so I have (f g) y <==> y f g y
I interpret no. 1 also as a (nested?) hook, if I'm right?
IOW (f m g h) y <==> (f G) y <==> y f G y
<==> y f (m (g h) y) <==> y f (m g h y)
<==> y f m g h y
I hope that my English isn't that bad
in making myself clear enough ;-)
Thanks
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm