; 1 2; 1 2 3 1 2 1 2 3 Perhaps you should read the dictionary.
(;;) 1 2; 1 2 3 +-----------+---------+ |+---+-----+|1 2 1 2 3| ||1 2|1 2 3|| | |+---+-----+| | +-----------+---------+ R.E. Boss > -----Oorspronkelijk bericht----- > Van: [email protected] [mailto:programming- > [email protected]] Namens mijj > Verzonden: dinsdag 2 augustus 2011 8:54 > Aan: Programming forum > Onderwerp: Re: [Jprogramming] Ragged Length Array Addition > > [(2 _2) +&.> (6&*)&.> 1 2; 1 2 3] worked .. but i wanted to combined it into > one expression. > > - for me at the moment, getting an understanding of J is more important > than a bare result. (And i didn't like the exra box op.) > > another prob i'm having, which ought to be simple is: > creating a concatenated list from boxed lists: > > i.e. > Jmagic 1 2;3 4 5 > NB. -> 1 2 3 4 5 > > i can do : > a,b [ 'a b' =. 1 2; 1 2 3 > NB. -> 1 2 3 4 5 > > but i feel i ought to be able to do this as some sort of variant of f&:> 1 2; 1 2 3 > where [f] involves some [,] activity. > > .. My water tells me this should be a simple expression. But i cant seem to > apply a [,] before a filler [0] is added to the short list. > > On 2011-08-01 22:06, Johann Hibschman wrote: > > mijj<[email protected]> writes: > > > >> d'oh .. i missed out one step .. i wanted to multiply the lot by 6 > >> before doing the addition. > >> > >> i had (2 _2) +&.> (6&*)&.> 1 2; 1 2 3 > >> > >> .. it was combining the [+&.>] and [(6&*)&.>] that was eluding me. > > > > I'm confused: that works fine for me. Wasn't it working for you? > > > > -Johann > > > > ---------------------------------------------------------------------- > > 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
