We need to address tacit default argument and rank to solve this problem.
Remembering that the colon separation is a conjunction and therefor you'll usually need to parenthesize the dyadic portion of the verb,

Your case is particularly interesting because it shows that rank can generate tables.


   v
3 : 0
1 v y
:
% (1+y)&^"0 x
)


   (v |.) 1 j. i.4   NB. rank matters!
0.153846j_0.230769          0.25j_0.25 0.4j_0.2                 0.5
_0.47426j_0.56942 _0.195093j_0.750499 0.211767j_0.67874 0.384619j_0.319481 _1.81895j0.782263 _1.63604j_0.464705 _0.544215j_0.990781 0.0917285j_0.491514 0.621928j5.25378 _2.69618j2.57786 _1.73502j_0.468598 _0.243497j_0.436703


   vdwl
1&$: :(%@:(^~ >:))"0 _


   ((v -: vdwl)|.)1 j. i.4
1

   vdwl2 =: 1&$: :([: % (^~/ >:))  NB. or we can use table

   ((vdwl2 -: v)  |.) 1 j. i.4
1


> Date: Thu, 3 Apr 2014 09:22:24 +1100
> From: "William Szuch" <bsz...@wsa-fincon.com.au>
> To: "J Programming Forum" <programm...@jsoftware.com>
> Subject: [Jprogramming] Fixed tacit
> Message-ID: <000601cf4ec2$06396380$12ac2a80$@wsa-fincon.com.au>
> Content-Type: text/plain;    charset="us-ascii"
>
> I would like to convert the follow explicit to a fixed tacit.
> Any help or suggestions greatly appreciated.
> v =: 3 : 0
> 1 v y
> :
> % (1+y)&^"0 x
> )
> Regards
> Bill Szuch

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

Reply via email to