On Dec 28, 2007 5:54 AM, neville holmes <[EMAIL PROTECTED]> wrote: > Raul Miller wrote (Dec 26): > > Now... it occurs to me that perhaps you mean for > > [. and ]. to follow the pattern set by $. -- I do not > > remember if we discussed this or not. If this was > > your meaning, you could have [. and ]. be analogous > > to [ and ] but finding the left and right arguments to > > the largest containing function (instead of the left > > and right arguments of the current function). > > I presume you mean $: and not $. and in any case > I did not have either in mind.
I did mean $: rather than $. Unfortunately, I do not use either often enough for me to remember them well. Either that or my sleep schedule is pushing me into early senility. Or maybe all of the above... > For example, as things are: > f =. 1 : '] ,: u' > a =. 9?10 [ b=. 9?10 > a * f b > 0 1 8 2 6 7 9 4 5 > 0 6 64 2 42 63 18 0 20 > g =. 1 : '[ , ] ,: u' > a * g b > 3 6 8 1 7 9 2 0 4 > 0 1 8 2 6 7 9 4 5 > 0 6 64 2 42 63 18 0 20 > > (These don't line up for me as Yahoo gives me > proportional spacing, but you'd see what I mean.) > > What I would like is for > f =. ] ,: [.' > g =. [ , ] ,: [.' > to have the same effect. Ok. > Would you please explain what the internal conflict > is in these examples, or, if a more complex example > is necessary to bring the conflict about, give such an > example with explanation. There is not conflict between those two examples. But keep in mind that the conflicts I am talking about have been between your examples, not within your examples. Anyways one basic problem is that J needs to know the part of speech represented by [. and ]. before it can parse expressions containing them. For example, consider -&*~ 9 0 3&*~ 9 177147 If you can figure out what these two examples do, you should also see that the underlying meanings for some of the words are entirely different, based on the parts of speech involved. Or, consider L. (1 + 2 + 3 + %)1 :'5!:1<''u''' 8 L.(1 + 2 + 3 + 4)1 :'5!:1<''u''' 2 Another contradiction for expressions involving [. would be that we do not know if the line represents an adverb or a conjunction. f=:[. Did you mean f=: 1 :'u' Or did you mean f=: 2 :'u' ? -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
