I should mention that Thomas replied 10 minutes after my post (accidentally sending the reply directly to my email rather than posting it in the forum) this:
> I think the dyadic case could simply be > > x m...@.(x v y) y > > So > > Ag =: 2 : 0 > m...@.(v y) y > : > x m...@.(x v y) y > ) this was already very useful since I couldn't get this far, so thanks Thomas! And thank you for the more elaborate versions of this conjunction. I'll answer very quickly to your post this time by saying that it would be interesting to see any sort of tacit conjunctions, and by offering for consideration the following conjunction- and Agenda-free version of Agenda: Ag4 =: 2 : 0 ((m {~ v) y)`:6 y : x (x (m {~ v) y)`:6 y ) Dan Bron wrote: > >> The problem: is there any way (i.e tacit/implicit) to model the dyadic >> case of the expected m...@.v ? > > There is a way to model the entire desired behavior of agenda, for both > derived monads and derived dyads. To wit: > > agenda =: conjunction define > if. verb = nc{.;:'v' do. > m...@.( v y) y > else. > m...@.n > end. > : > if. verb = nc{.;:'v' do. > x m...@.(x v y) y > else. > m...@.n > end. > ) > > or, perhaps with more fidelity, > > agenda2 =: conjunction define > if. verb = nc{.;:'v' do. > fp =. adverb def ' ''('' , '')'' ,~ 5!:6{.;: ''u'' 'NB. > Fully > parenthesize > txtV =. v fp NB. > Selection verb > as text > txtM =. m fp NB. > Gerund as text > txtMonad =. ' ', txtM , '@.( ', txtV ,' y) y ' NB. > Monad as text > txtDyad =. ' x ', txtM , '@.(x ', txtV ,' y) y ' NB. > Dyad as text > 3 : ( txtMonad ; ':' ; txtDyad ) > else. > m...@.n > end. > ) > > . > > Of course, this is explicit, and you asked for tacit/implicit. Now, in > old > versions of J there were specific, supported rules for deriving a > conjunction tacitly. Those rules were removed in J5. However, I recently > (relativly speaking) discovered that there might be a different path to > this goal (defining tacit conjunctions). But I'm still not certain of it. > > What I am certain of, is that it's possible to tacitly define adverb, > which, given an argument, itself derives another adverb, which, given an > argument derives the "end target" (be that a verb, noun, or even another > adverb, ad infinitum). This allows us to tacitly define an adverb that is > functionally equivalent to a conjunction; it takes two arguments to > produce a verb (or whatever), which operates as usual. > > Of course, with this type of entity, both arguments to the "conjunction" > would appear on the left (seriatim), as opposed to a true conjunction, > which has one argument on the left and another on the right. But > depending on your needs, that may be a minor syntactic issue. > > I have some ideas of how we might use this pattern to define a tacit > agenda > with the desired properties; but the fact that all 3 or 4 arguments > (gerund, selection verb, and argument(s) to the derived verb) are required > simultaneously might present a hurdle. > > However, if you're interested, I could give you some pointers. > > -DAn > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > -- View this message in context: http://old.nabble.com/Wrong-agenda--tp26426928s24193p26473193.html Sent from the J Programming mailing list archive at Nabble.com. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm