>> x] u C (v n.) y [x] u C ([x] v y) y [x] u n. C v y [x] ([x] u y) C v y
[x] u n. A y [x] ([x] u y) A y you want n. to "dig through" the function to calculate a result using xy before passing it to modifier without consuming/removing the xy arguments. For a specific (CA in your examples) modifier, this is easy as an explicit definition. For a general function, you need to access x and y, and explicit seems like the best bet with passing in a representation of the modifier. On Tuesday, December 21, 2021, 09:24:58 p.m. EST, Elijah Stone <[email protected]> wrote: With all this discussion of tacit modifiers, I fear their lower-order cousins are going out of style! The proof of completeness for trains (https://code.jsoftware.com/wiki/Essays/Trains#Proof_of_Completeness) contains two concerning notes: > Without loss of generality, assume that [sentence] s contains no > copulae; for if it does, d=.rhs (say), recursively replace instances of > d by (rhs) This transformation is problematic if rhs performs side effects; for it may cause those effects to be performed more than once, or not at all; or to be sequenced differently relatively to other side effects. In some cases, it may nevertheless possible to straightforwardly express an effectful verb tacitly. For instance: {{ a=. 0 [ echo y a + y + a }} becomes: (] + [ + ]) (0 [ echo) but some are not so straightforward {{ a=. 0 [ echo y b=. 0 [ echo y a + b + y + a + b }} It can be done, of course, but not without cheating (e.g. by using boxes, or by observing that + is commutative). Question: what is a clear and concise definition of the subset of effectful explicit verbs which may be made tacit without cheating? > Suppose s is a sentence [that] makes no use of x. or y. as arguments to > an adverb or conjunction A shame; on multiple occasions, I have wanted to do exactly this, and have had to write explicit code. (In some cases, it is possible to get around the problem by passing a gerund to the conjunction; but that is not general; it is somewhat obscure; and frequently requires redundant [ or ].) Suggestion: a new primitive adverb. Call it 'n.'. Like [:, it is syntactically regular, but semantically irregular. Just as there is a rule for the evaluation of forks whose left tines are [: which takes precedence over the regular rule for the evaluation of forks, so are there rules for the evaluation of sentences containing n. which take precedence over the rules for evaluation of ordinary sentences: [x] u C (v n.) y [x] u C ([x] v y) y [x] u n. C v y [x] ([x] u y) C v y [x] u n. A y [x] ([x] u y) A y Objections: - n. assumes that modifiers return verbs. Something like 'u n. A' _must_ be assumed to be a verb for this mechanism to make any sense. Evaluation of A must be deferred, which is even more irregular than [:. - The common case of u C (f y) requires many parentheses if the input is modified by a train: u C ((f g h)n.). (On the other hand, this is no worse than the explicit code, which must write u C ((f g h) y). NARS2000 suggests a mitigation in the form of higher-order modifiers: assuming a higher-order ~, one might write (f g h)n. ~C u. This is not a serious suggestion.) -E ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
