Description
The Function class should have a method
apply(ArgumentDescription args);
where
class ArgumentDescriptor {
final List positionalArguments;
final Map<String, dynamic> namedArguments;
ArgumentDescriptor(List this.positionalArguments,
Map<String, dynamic> this.namedArguments);
}
Now that Function is a class, it would make sense to have Function contain an implementation.
Real functions need to have a magical apply() that takes the incoming formal parameter args, extracted the actual arguments from it and invoked the function. However, the Function class is presumably separate, and could define apply as:
apply(ArgumentDescription args) => this.call.apply(args);
It would be quite reasonable for people to extend (not just implement) Function.