Skip to content

Instantly share code, notes, and snippets.

@baeharam baeharam/main.dart
Last active Jul 10, 2018

What would you like to do?
typedef, underscore parameter
typedef Compare = int Function(Object a, Object b);
class SortedCollection {
Compare compare;
// Initial, broken implementation.
int sort(Object a, Object b) => 0;
void main() {
SortedCollection coll = SortedCollection(sort);
assert( is Function);
assert( is Compare);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.