On Thu, 30 Jul 2009, Bo Jacoby wrote:
> Then I make a dyadic verb, ms1, computing mu,sigma 
>    ms1 =. 4 : 'm,%:((*/y-1 2)*%/x-1 3)+(*-.)m=.(y-1)*%/x-1 2'
> test:
>    6 ms1 14
> 16.25 3.49106
> 
> When I try to simplify by the hook (m,f m) === (,f)m
>    ms2 =. 4 : '(,(%:((*/y-1 2)*%/x-1 3)+(*-.)))(y-1)*%/x-1 2'

rewrite it into
       m,  %: @: ( ((*/y-1 2)*%/x-1 3) + (*-.) )  m
                   ..................
                   a constant verb     +  hook 
                                     fork

ms2 =. 4 : 'm , %: @: ( ((*/y-1 2)*%/x-1 3) + (*-.) ) m=.(y-1)*%/x-1 2'


then simplify by the hook (m,f m) === (,f)m

 ms2 =. 4 : '(, %: @: ( ((*/y-1 2)*%/x-1 3) + (*-.) )) (y-1)*%/x-1 2'

However isn't ms1 more comprehensible?

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to