Hi Linda,
Shouldn't it be
f=: 13 : '((+*:) i.) y'
f
(+ *:) i.
f 6
6 7 10 15 22 31
Cheers, bob
> On Jun 1, 2019, at 10:28 AM, Linda Alvord <[email protected]> wrote:
>
> This seems right.
>
> f=: 13 :'(+*:)&i.y'
> f 6
> 0 2 6 12 20 30
>
> f
> (+ *:)&i.
>
> Linda
>
> Sent from my Verizon, Samsung Galaxy smartphone
>
>
> -------- Original message --------
> From: Raul Miller <[email protected]>
> Date: 5/31/19 2:33 PM (GMT-05:00)
> To: Programming forum <[email protected]>
> Subject: Re: [Jprogramming] incrby =: (&>) i.
>
> Early J supported a variety of trains that are not currently supported
> (and which, sadly, can't be re-enabled using a foreign).
>
> That said, you can still achieve their results using explicit definitions.
>
> However, in explicit definitions, some names are reserved: m n u v x y
>
> So I would first use a different name than 'v':
>
> V=:+*:
>
> WIth that out of the way, I can go:
>
> incrby=:1 :'(u (&>) i.) y'
> V incrby 6
> 6 7 10 15 22 31
>
> Thanks,
>
> --
> Raul
>
> On Fri, May 31, 2019 at 2:23 PM Ulrich Vollert <[email protected]> wrote:
>>
>> 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
>>> https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C03dab1e81af5409e9b7508d6e5f6874b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636949244324933912&sdata=eS37cpQRIjB1ERHNJTdT%2FBxDGy5lmGQ%2BzlnjnfUArZc%3D&reserved=0
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see
>>> https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C03dab1e81af5409e9b7508d6e5f6874b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636949244324933912&sdata=eS37cpQRIjB1ERHNJTdT%2FBxDGy5lmGQ%2BzlnjnfUArZc%3D&reserved=0
>>
>> ----------------------------------------------------------------------
>> For information about J forums see
>> https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C03dab1e81af5409e9b7508d6e5f6874b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636949244324933912&sdata=eS37cpQRIjB1ERHNJTdT%2FBxDGy5lmGQ%2BzlnjnfUArZc%3D&reserved=0
> ----------------------------------------------------------------------
> For information about J forums see
> https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C03dab1e81af5409e9b7508d6e5f6874b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636949244324933912&sdata=eS37cpQRIjB1ERHNJTdT%2FBxDGy5lmGQ%2BzlnjnfUArZc%3D&reserved=0
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm