Last active
May 9, 2017 22:43
-
-
Save zidenis/337e22e8f32079463f6569b33da3d7a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var prettyFunc = new PrettyPrint(); | |
print(prettyFunc is Function); // true | |
prettyFunc.call("A", "Dart is cool", "B"); // A Dart is cool B | |
prettyFunc("C", "Dart is cool", "D"); // C Dart is cool D | |
var args = ["E", "Dart is cool", "F"]; // E Dart is cool F | |
Function.apply(prettyFunc, args); | |
} | |
class PrettyPrint { | |
call(prefix, msg, sufix) => | |
print("$prefix $msg $sufix"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment