Start with

x u c v y

where c is an explicit definition.

The first execution is (u c v).  This has available the text of c, and the values of u and v.

If the text of c does not refer to x or y, it is simply executed on the given u/v and can produce any part of speech.

But if the text of c refers to x/y, what is to be done?  These symbols have no meaning.  To make sense of the situation the interpreter assumes that (u c v) creates something that will take its x/y arguments from the rest of the sentence.

In J, this result of (u c v) is required to be a verb.  Thus its arguments x/y must be nouns and it must produce a noun result. That is what you are seeing.

Henry Rich




On 1/30/2020 9:01 PM, Raoul Schorer wrote:
Hi,

I wrote a dyadic conjunction, that I call as:

x u conj v y, where x u v y are all nouns

However, I get the error "noun result was required". My conjunction
actually yields a "suspended function" (thunk) in the form of a string
wrapped in the "_ verb, as in ('recursive_function')"_
I have two questions regarding that:


    1. In JfC, it is stated that the result of a conjunction may be another
    conjunction, and that conjunctions may return any part-of-speech. Can you
    give me pointers on why this may fail as above?
    2. If as I suspect, it is difficult to provide a general explanation,
    can you point me towards ways of debugging such an issue, where I just get
    an error from a function that yields a string to be interpreted (making
    'dissect' apparently useless)?


Thanks!
Raoul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to