Yes, sorry... transcription problem. As I said, it does x + 2y, Mike Please reply to [email protected]. Sent from my iPad
> On 29 Nov 2018, at 10:31, Martin Kreuzer <[email protected]> wrote: > > Mike - > (having followed only loosely) shouldn't this 'hook' read > h=: + +: > ? > -M > > At 2018-11-28 23:05, you wrote: > >> Thanks, though I think Cliffâs approach is more advanced. >> >> Noticing that your g is applied with ~, you can also use this âhookâ >> h =: + + >> which does x + 2y >> >> Also, you can use the constant noun _1 1, so avoiding the constant function >> _1 1â_ , as the lhs in this expression: >> (_1 1$~]) 5 >> _1 1 _1 1 _1 >> >> So your verb may be modified thus: >> 4 (h/\.&.|.@, _1 1$~]) 5 >> 4 7 15 29 59 117 >> >> Or with another variation for building the list of +-1, >> 4 (h/\.&.|.@, $&_1 1) 6 >> 4 7 15 29 59 117 235 >> >> I wonder if this discussion is what Skip was hoping for? >> >> Cheers, >> >> Mike > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
