Norman Thompson defines a verb

v =: +*:

which computes n(n+1).

Now 

(v i.) 6

gives y + i*i (i=0,1,..,y)

6 7 10 15 22 31

and then he says: „This can be generalized by defining an adverb:

incrby =: (&>) i. 
v incrby 6
6 7 10 15 22 31
"

which I really don’t understand and which is a syntax error in j807/j64/darwin.


> Am 31.05.2019 um 20:05 schrieb 'Pascal Jasmin' via Programming 
> <[email protected]>:
> 
> can you tell us what the function is expected to do?
> &> is an unboxing adverb
> (a v) is a syntax error.  But perhaps an early version of J, it wasn't.
> 
> 
>    On Friday, May 31, 2019, 2:00:00 p.m. EDT, Ulrich Vollert <[email protected]> 
> wrote:  
> 
> Hello,
> 
> I am reading „J: The natural language for analytic computing“ and on page 47 
> the author defines an adverb
> 
>     incrby =: (&>) i.
> 
> which leads to a syntax error if I try to define it.
> 
> Any hint what is going on?
> 
> Regards,
> Ulrich
> 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
> ----------------------------------------------------------------------
> 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