The same result can be obtained with:

   ((<2&+) *.>:)"1 0~t
1 1 0 0 0 0 0 0
0 1 1 0 0 0 0 0
0 0 1 1 1 0 0 0
0 0 0 1 1 1 0 0
0 0 0 0 1 1 1 0
0 0 0 0 0 1 1 1
0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 1

On 12-10-12 11:43, Alexander Epifanov wrote:
To be more clear:
    t =: 2 3 4 5 5.7 6.3 7 8
    (3 : '(((y < 2&+) *. y&>:)"0 y)') t
1 1 0 0 0 0 0 0
0 1 1 0 0 0 0 0
0 0 1 1 1 0 0 0
0 0 0 1 1 1 0 0
0 0 0 0 1 1 1 0
0 0 0 0 0 1 1 1
0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 1

On Fri, Oct 12, 2012 at 11:25 AM, Alexander Epifanov <[email protected]> wrote:
Hello,
Could you help: cannot write function, which gets t as arguments and
do something like described above.

    t
2 3 4 5 6 7
    t&<:"0 t
1 0 0 0 0 0
1 1 0 0 0 0
1 1 1 0 0 0
1 1 1 1 0 0
1 1 1 1 1 0
1 1 1 1 1 1

how to pass t on the left side of <: which is a function to "0? I
would like to use Tacit style.

Thank you.

--
Regards,
   Alexander.



--
Met vriendelijke groet,
@@i = Arie Groeneveld

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

Reply via email to