If a function call is made - either for an implementation or as a one-off function call - validation should check that arguments that are function calls are using a function whose return type is compatible with the type of the given argument.
E.g.
concatenate("ab", reverse("ab"))
when validating this function call, expecting a string for the second argument, we should check that reverse has the return type string, or else raise a validation error