Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以参考https://tech.meituan.com/archives 感觉可以优化运行时 #7

Open
jinliyuelong opened this issue Jan 21, 2021 · 0 comments

Comments

@jinliyuelong
Copy link

https://tech.meituan.com/archives

核心是
// function.dart
abstract class Function {
/**

  • Dynamically call [function] with the specified arguments.
  • Acts the same as calling function with positional arguments
  • corresponding to the elements of [positionalArguments] and
  • named arguments corresponding to the elements of [namedArguments].
  • This includes giving the same errors if [function] isn't callable or
  • if it expects different parameters.
  • Example:
  • Function.apply(foo, [1,2,3], {#f: 4, #g: 5});
  • gives exactly the same result as
  • foo(1, 2, 3, f: 4, g: 5).
  • If [positionalArguments] is null, it's considered an empty list.
  • If [namedArguments] is omitted or null, it is considered an empty map.
    */
    external static apply(Function function, List? positionalArguments,
    [Map<Symbol, dynamic>? namedArguments]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant