Raul is right, but just to be clear, when applied to arguments, sincos d. 1 and 
sincos f. d. 1  will have identical results*.  Just type into the IJX without 
arguments, the latter looks different from the former for exactly the same 
reason sincos f.  looks different from sincos .

That is, f. explicitly requests its argument be exploded into its components 
(but again, the argument to f. applied to its own arguments will havbe the same 
results, exploded or not - that's the point of naming stuff - subordinating 
detail / hiding complexity).
 
-Dan

* I haven't tested this, but if it isn't true, that's an interpreter bug.




Please excuse typos; composed on a handheld device.

-----Original Message-----
From: Raul Miller <[email protected]>
Sender: [email protected]
Date: Fri, 19 Nov 2010 16:07:43 
To: Programming forum<[email protected]>
Reply-To: Programming forum <[email protected]>
Subject: Re: [Jprogramming] Accessing a verb as the composition of its
        "primitives"

On Fri, Nov 19, 2010 at 3:53 PM, Alex Gian <[email protected]> wrote:
>   sincos =. (1&o. * 2&o.)
>   sincos d. 1
> sincos d.1              NB.  Hm....
>
> What can I do to the "sincos" verb so that it is presented to the d.
> adverb in terms of its primitives so that the differentiation can take
> place?

   sincos =. 1&o. * 2&o.
   sincos f. d. 1
(2&o. * 2&o.) + 1&o. * -@(1&o.)

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

Reply via email to