Unfortunately (as no doubt you are aware):

   x=:5 5 6 5
   1 */\. x
150 150 125 150
   */@-."1 0~ x
6 6 125 6


However, if we constrain our input to unique vectors, I'll note that we can 
replace the =@i.@# in your original solution with simple, modest (monad) e. :

   (-.e.x) */ .(^~) x
48 64 96 24

That's an "improvement" even over =@/:   . 

> On Mar 27, 2014, at 5:58 PM, Roger Hui <[email protected]> wrote:
> 
>   */@-."1 0~ 4 3 2 8
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to