forArgument
fun forArgument(context: ExecutionContext, procedure: Signature, expectedDomain: DomainError.Expected, actualValue: Term, index: Int? = null): DomainError
Creates a DomainError reporting that the (optionally index-th) argument of procedure should have belonged to expectedDomain, but actualValue was provided instead.