Open
Description
f=: N+] N=: 3 f 1 |domain error in N, executing monad N | f 1
Because N
wasn't defined at the time that f
was, it was assumed to be a verb. When the execution of [N
as a verb] was attempted, an error was raised because it instead referred to a noun.
This is reported as a domain error, which it is confusing; it should be interpreted as a value error since it concerns N's part-of-speech only. It might say e.g.
|value error in N, executing monad N: N was expected to be a verb, but is defined as a noun | f 1
Perhaps better would be to instead attempt to interpret N
as a noun and apply the containing expression accordingly, upon the interpreter seeing that N is a noun (or just as a general fallback to attempted verb interpretations). This latter suggestion might not be feasible, depending on implementation details.
Metadata
Metadata
Assignees
Labels
No labels