You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered: