There isn't really a better way to do that test. Conceptually, what you want is a test that determines whether two verbs would always produce the same results for the same arguments, but that's a problem involving infinities. It's proof territory.
That said, typically we solve this kind of problem by hand, rather than using a test on the structure of the verb. Good luck, -- Raul On Tue, May 3, 2022 at 5:20 AM Ric Sherlock <tikk...@gmail.com> wrote: > > I want to test if a particular verb was provided to my adverb. > I came up with the solution below. Is there a better way? > > myadverb = {{ > res=. u {:y > if. theverb f.`'' -: u f.`'' do. > res=. ({.y) ,: res > end. > res > }} > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm