A dyad x f y in J is defined so that x&f is a more 
sensible function than f&y , unless there is
a firmly entrenched argument order.  In the cases 
of | and %, the judgment is that m&| ("modulo m") 
is more useful than |&i , and there is little 
chance of convincing people that % should be 
"divided into" rather than % .

The existence of passive (~) takes the sting off 
having the wrong order.



----- Original Message -----
From: Terrence Brannon <[EMAIL PROTECTED]>
Date: Wednesday, May 23, 2007 11:05 am
Subject: [Jgeneral] Why does the Residue function take its arguments in 
"reverse" order

> It seems that the Residue function should follow the same argument 
> order as %
> 
> It does not seem consistent or intuitive for the arguments to be 
> reversed.
> What motivated this decision? I spent 5 minutes about to tear my 
> hair out trying
> to figure out the results I was getting from Residue.
> 
> 7 % 2
> 3.5
>   2 | 7    NB. would be 7 | 2 if I were designing J :)
> 1
> 
> 
> I'm sorry to ask what seem like such nitpicky little questions, 
> but I got a
> great answer regarding Passive, so perhaps I am just ignorant of 
> some loftier
> motivation for such argument calling conventions.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to