Hello Dan;

The statement is _not_ true of ...h&]... point taken. I'm still thrown by the late entry of the @:, which I sometimes still think of as @ . A senior J'er moment, if you will.

Dan Bron wrote:
RM=Randy MacDonald, DB=me

RM> A good explanation for my original question is: dyadic use RM> of (f g h &]) allows the right verb in the fork to ignore the RM> fork's left argument.

Actually, it is the dyadic use of  (f g h @:])  which allows the right verb of 
a fork to ignore the fork's left argument.    I
suspect Raul had a typo when he wrote  &]  (and he didn't notice the error 
because it wouldn't be apparent unless he tried to
invoke the fork dyadically).

As an intersting aside,  &]  is sort of an "identity adverb", in that  (u y) -: u&] 
y  and  (x u y) -: x u&] y  .
RM> (Now, where in the manual one could put that statement, I don't know.)
It's a couple of paragraphs down from the part where it says  2+3  is  5  :)
That text should be just as searchable, at least bottom-up.
DB> PPS: In x 6!:2 y I assumed x would be constrained to the positive DB> integers. But I tried 0 (with the expected result) and negative DB> numbers (with unexpected results)

RM> What do you see as the expected result?
Well, in advance of trying it, I expected an error.  But if you said to me "if  0 
(6!:2) y  produces a result, what is it?", I
would have said "0"  because that's how long it takes to execute a(ny) sentence 
zero times.  So when I saw the result (indeed,  0
), I was not surprised.

Similarly, before I tried  (-x) 6!:2 y  I expected a domain error (again), but 
this time I was surprised when I didn't get one.  I
got a very small negative result, no matter what  y  I used.  Unlike the case 
for zero, I cannot reconcile this result with the
definition of the foreign (maybe if  (-x) 6!:2 y  were just  - (x 6!:2 y)  I 
could be talked into it).

I suspect the result of  (-x) 6!:2 y  is an unintentional artifact of its 
implementation (in C code).

RM>  What about fractional left arguments?

I did try fractional, infinite, and complex left arguments, and got the errors 
I expected.  If I had to come up with a consistent
definition with fractional  x  , it might be something like "time executing the 
sentence (<.x) times, add to that the time it
takes to execute  (x-<.x)  times [by stopping the sentence partway through] and 
divide the result by  x  ".  But in practice
that's silly.

Linear interpolation?  It doesn't seem that simple.
-Dan

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


--
------------------------------------------------------------------------
|\/| Randy A MacDonald       | APL: If you can say it, it's done.. (ram)
|/\| ramacd <at> nbnet.nb.ca |
|\ |                         | The only real problem with APL is that
BSc(Math) UNBF'83            | it is "still ahead of its time."
Sapere Aude                  |     - Morten Kromberg
Natural Born APL'er          |
-----------------------------------------------------(INTP)----{ gnat }-



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

Reply via email to