On Mon, Sep 26, 2011 at 1:09 PM, The Geeko <[email protected]> wrot > Raul Miller <rauldmiller <at> gmail.com> writes: >> If you wanted, you could define: >> >> nl_z_=: 4!:1@(] -. -.~)&(i.4) >> >> Note, however, that this would deprive you of the left argument for names.
> Is it possible, in J, to define my own version of nl which would keep the > niceties of the dyadic behavior of the left, but enhance it with the behavior > from namelist? Certainly. That said, unless you want a definition which is hard to read, you should define the behaviors you to want to keep using separate words, and these words would either need to be defined in z or referenced using a fully qualified reference to their locale. Then you would build up a tacit expression using your new word(s), to replace nl. That said, the handling of the left argument for names is rather ad-hoc, in my opinion. Which leaves me with the choice of doing something new and breaking anything that relies on the current implementation or doing something new and using different word to access it (words other than 'names' and 'nl'). It's a slippery slope and I'm not sure where to stop... So, anyways, I go with the lazy approach and just live with names as it is. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
