Raul Miller-4 wrote: > > [...] >> Train is what we have before the interpretation, and then >> the Bident rule produces noun, verb, adverb or conjunction >> (which may or may not be a part of a still uninterpreted train). > > No, in the general case, and in the example of A=:v conj > we have a queue (and a stack) before the the parsing rule > applies. However, in the cae of A =: v conj, the bident > rule applies (where the stack is (=: v conj marker) and > bident produces the curried sequence v conj. > Ok then, v conj is not an anonymous adverb as I claimed but something called "curried sequence". I like that, it sounds yummy.
>> When you give it zero arguments, it evaluates to that same conjunction. > > Not in the general case: > > A=: . > + (A) > +A > > Here, A inside the parenthesis had zero arguments, and > yet it did not evaluate to itself. > To what exactly did A inside the parenthesis evaluate if not to A? >> In J for instance, we can use f. to fix the definition of a verb, >> but no such facility exists for fixing definitions of adverbs. > > What purpose would this facility serve? > > Anyways, if A is a defined name, in J, then > ((5!:1 <'A') 5!:0) > is that name's value, regardless of the class of object > represented by A > If we consult the DOJ about f., it says: > If x is the name of any entity (that is, a pronoun, proverb, pro-adverb, > or pro-conjunction), > then 'x' f. is equivalent, but with all names in its definition > recursively replaced by their referents. > Let's try it. A is a pro-conjunction, and then: 'A' f. |value error: v | 'A'f. The rational for this error is clear: since v is not defined, A cannot be fixed, (which in terms of functional programming means: A has no definition.) This is just like in the case of fixing a verb that is defined through some undefined verb. If we define v, everything works: v=:+ 'A' f. +" This answers my question about fixing an adverb, but it still does not explain the J's rules for stacking by name vs stacking by value. -- View this message in context: http://www.nabble.com/Stacking-by-name-tp24918138s24193p24988447.html Sent from the J Programming mailing list archive at Nabble.com. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
