Matthew, If you do not have the complications of different locales that Bill mentions, can't you have an ambivalent adverb like this?
acollect =: adverb define mcollect code : dcollect code ) 2009/3/28 Matthew Brand <[email protected]>: > I wanted to make it so that I can call it like this: > x ('nameofmethod' acollect) y > > ('nameofmethod' acollect) y > > e.g. If I had a collection C of objects that had a dyad method M which > adds x and y and some internal variable, then to execute it in all > members of C and get the result output as a boxed list I would use: > > 2 'M' acollect__C 5 > > > On Sat, Mar 28, 2009 at 1:14 PM, bill lam <[email protected]> wrote: >> On Fri, 27 Mar 2009, Matthew Brand wrote: >>> I have made a Wiki page and put on it something I wrote recently to >>> collect objects together (collection). It inherits from another class >>> called usn (Unique Sequential Number) which I originally wrote to >>> organise files on the disk with each one containing data from a >>> different time slice but it turned out to have this other use. >>> >>> Is there already a similar object to the collection object or a better >>> way to do it? >>> >>> One thing that I would have liked to have done was to make the >>> mcollect and dcollect into a single adverb, but I could not get it to >>> work. >> >> Actually I do not quite understand your code but the mcollect and >> dcollect in you code are verbs. Are you sure you want an adverb >> instead? Suppose you want a single verb mdcollect then add an extra >> box to the argument and then count inside mdcollect like >> >> if. 1=#>y do. >> mcollect code >> else. >> dcollect code >> end. >> >> HTH >> >> -- >> regards, >> ==================================================== >> GPG key 1024D/4434BAB3 2008-08-24 >> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 >> 唐詩183 杜甫 客至 >> 舍南舍北皆春水 但見群鷗日日來 花徑不曾緣客掃 蓬門今始為君開 >> 盤飧市遠無兼味 樽酒家貧只舊醅 肯與鄰翁相對飲 隔籬呼取盡餘杯 >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > > > > -- > http://www.ixquick.com/ > > Ixquick Protects Your Privacy! > The only search engine that does not record your IP address. > > http://www.vivapalestina.org/ > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm -- (B=) <-----my sig Brian Schott ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
