The Vector front page says that the Dyalog function
   {(+/omega)divide rho omega}
is the same as the J tacit verb
   (+/%#)
They are not the same.  One difference comes from 
the difference between # and rho; another difference
is between +/ in J and +/ in APL (+/ in J is + slashbar
in APL); another is the difference in the way they are 
used in operator expressions.  (e.g. (+/%#)"r a).

Can someone with access to Dyalog APL tell me
what the following does? (index origin 0)

   a {is} ? 3 5 7 {rho} 100
   {(+/omega) divide rho omega} a
   {(+/omega) divide rho omega}[0] a
   {(+/omega) divide rho omega}[1] a
   {(+/omega) divide rho omega}[2] a



----- Original Message -----
From: Dan Bron <[EMAIL PROTECTED]>
Date: Thursday, October 25, 2007 13:26
Subject: Re: [Jprogramming] Puzzle from "The Early Years"
To: Programming forum <[email protected]>

> Roger posed:
> >  What is the shortest expression you know of for 
> computing 
> >  the average of a vector v?  (Shortest = fewest 
> words.)  
> 
> Someone at Vector may've been reminiscing about the same 
> puzzle;  check out the APL and J examples in the big yellow 
> box at the top of their front page:
> 
>     http://www.vector.org.uk/
> 
> >  The J answer is shorter than the APL answer.
> 
> This is due to the verb train innovation; i.e. tacit code.  
> The sole difference is that APL must name the vector twice.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to