I'd also encourage you to provide an example of the problem you want to solve (ideally including example inputs & outputs), forum members may come up with alternative solutions perhaps even some that don't require "0
> From: Dan Bron > Sent: Wednesday, 8 September 2010 09:21 ... > > That applies to J as well, though I would add an intermediate step "... > complain on the Forums and see what answers you get first, ...". ... > > -Dan > > > Please excuse typos; composed on a handheld device. > > -----Original Message----- > From: Justin Paston-Cooper <[email protected]> > Sender: [email protected] > Date: Tue, 7 Sep 2010 21:47:30 > To: Programming forum<[email protected]> > Reply-To: Programming forum <[email protected]> > Subject: Re: [Jprogramming] Collecting Results > > Thanks a lot. I always forget about boxed lists. Applying ; to that > gives exactly what I want. Is there any way to do it without boxing, > though? This will be applied many times and I don't know how efficient > this will be. > > On 7 September 2010 21:32, Dan Bron <[email protected]> wrote: > > You want m&.> f . Note this is rank 0 already, so no reason for an > explicit"0 . > > > > I'm on the road right now so I can't post a fuller explanation, but > it might be understandable if you're told that <@m"0 f is equivalent, > and that > is both scalar (rank zero) and an identity function on an > open (non-boxed) noun. > > > > -Dan > > > > > > > > > > Please excuse typos; composed on a handheld device. > > > > -----Original Message----- > > From: Justin Paston-Cooper <[email protected]> > > Sender: [email protected] > > Date: Tue, 7 Sep 2010 21:09:37 > > To: <[email protected]> > > Reply-To: Programming forum <[email protected]> > > Subject: [Jprogramming] Collecting Results > > > > Hello, > > > > Let's say I have a monad m " 0 and a 1-dimensional array f. The monad > > returns 1-dimensional arrays of varying results which may include 0. > I > > would like to efficiently apply the monad m to array f and collect > the > > results returned by m in a 1-dimensional array. m f would not be > > satisfactory because 0s may be added to the ends of the results which > > are shorter than the longest result. Is this possible? Thanks for > your > > advice in advance. > > --------------------------------------------------------------------- > - > > 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 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
