Skip to content

Instantly share code, notes, and snippets.

@baeharam baeharam/main.dart
Created Jul 10, 2018

What would you like to do?
class SortedCollection {
Function compare;
SortedCollection(int f(Object a, Object b)) {
compare = f;
// Initial, broken implementation.
int sort(Object a, Object b) => 0;
void main() {
SortedCollection coll = SortedCollection(sort);
// All we know is that compare is a function,
// but what type of function?
assert( is Function);
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.