TIL apply is indeed a verb. eval keeps the dynamic apply execute code, adding the removal of serializing dyadic left argument to it as well. And, dynamically executing parts or whole adverb phrases. Apply being a verb does create flexibility of applying modifiers to it.
----- Original Message ----- From: Dan Bron <[email protected]> To: "[email protected]" <[email protected]> Cc: Sent: Sunday, April 6, 2014 1:03:43 PM Subject: Re: [Jprogramming] an improvement to apply and perhaps anon evoke Eval can't be used as a substitute for apply (128!:2) because eval is an adverb and apply is a verb (the whole point of introducing apply was to have a verb [whose arguments can change at runtime] which can dynamically apply execute code, without requiring that code's arguments to be serialized first, as ". does). As to anon evoke, the first version was is founded on the same principles as eval, basically 1 : , except the aim of the utility was to do so *anonymously*, i.e. without naming any arguments - in particular, without naming the argument to :, u . Since we ready have : and 'name'~, There was no particular This was in pursuit of creating a *tacit* evocation f goal was to express the utility The idea > On Apr 5, 2014, at 1:26 PM, Pascal Jasmin <[email protected]> wrote: > > apply does not work with dyadic verbs, and cannot produce modifiers. > Consider the following simple looking eval function. > > eval =: 1 : ' a: 1 : m' > > > 2 '+' eval 1 2 3 > 3 4 5 > > > + '/' eval 1 2 3 > 6 > > > > '+/' eval(+:@) 1 2 3 > 12 > > > +:@+'/' eval 1 2 3 > 22 > > > +: +'/' eval 1 2 3 > 12 > > > (+: '@' eval +)'/' eval 1 2 3 > > 22 > > +: '@' eval +'/' eval 1 2 3 > 12 > > > The last statement is interesting because it seems to alter the normal > conjunction train processing (sometimes in desirable ways) > > instead of just grabbing a single token as v. > > < '@' eval +'/' eval 1 2 3 NB. would be domain error without '@'eval > ┌─┐ > │6│ > └─┘ > > > eval is the key to how my multiline tacit code works: > http://www.jsoftware.com/jwiki/PascalJasmin/Multiline%20tacit%20expressions%20with%20macros > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
