---Alex Rufon wrote:
> Somebody here in the list gave me the following tacit definition last
> year:
>
> adbom2bconsump=: [: (#~ (0 ~: 1&{"1))@; <@(0&{ ,. 1&{ ([EMAIL PROTECTED] ,.
> (] +//.
> ["0) ,. [ * [EMAIL PROTECTED]) 2&}.)"1
>
> adbom2bconsump i. 2 5
> Now I have another task which has a similar requirement but
> not exactly
> the same input. So I was debugging this by executing the code one by
> one. Then I remembered that there was supposed to be a
> way/method which
> will automatically box the script by the order of execution.
> The problem
> is, I can't remember it.
You might be referring to boxed syntax:
Edit|Configure|Display|Display Form|Box
(I've used the tacit verb mean to circumvent linewrapping problems.)
mean=: +/ % #
mean
+-----+-+-+
|+-+-+|%|#|
||+|/|| | |
|+-+-+| | |
+-----+-+-+
Or perhaps trace:
load 'trace'
trace '(+/ % #) i.2 5'
--------------- 3 Adverb -----
+
/
+/
--------------- 5 Trident ----
+/
%
#
+/ % #
--------------- 8 Paren ------
(
+/ % #
)
+/ % #
--------------- 1 Monad ------
i.
2 5
0 1 2 3 4
5 6 7 8 9
--------------- 0 Monad ------
+/ % #
i.2 5
2.5 3.5 4.5 5.5 6.5
==============================
2.5 3.5 4.5 5.5 6.5
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm