Were you expecting

   +:`*:`-: ((>@[ apply ])"0) 1 2 3
2 4 1.5

or

   +:`*:`-: ( apply &.>) 1 2 3
+-+-+---+
|2|4|1.5|
+-+-+---+


or none of the above?




________________________________
From: Steven Taylor <[email protected]>
To: Programming forum <[email protected]>
Sent: Friday, January 30, 2009 11:28:43 AM
Subject: [Jprogramming] gerrunds

Hi,
I was hoping to make a gerund apply itself monadically to each element of an
array similar to the insert example

  h=:+`^
  h/ 3,4,5
1027


  g=:+:`*:`-:
  g 1 2 3
|syntax error
|      g 1 2 3


I also tried vectorising:

  g...@.(i.3) 1 2 3
|domain error
|      g...@.(i.3)1 2 3


Is this possible without a loop?


Steven
----------------------------------------------------------------------
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