Permalink
Browse files

Debugging the 'pass a closure to a specialized generic class' thing.

  • Loading branch information...
Amos Wenger
Amos Wenger committed Jun 8, 2012
1 parent 343f4c0 commit 4d5487798314eef4431f6706f1e31b196539acb4
Showing with 6 additions and 5 deletions.
  1. +6 −5 samples/sorting.ooc
View
@@ -21,14 +21,15 @@ List: class <X> {
(data[i], data[j]) = (get(j), tmp)
}
- prount: func {}
+ bbtrap: func {}
print: func (f: Func (X) -> String) {
"(" print()
for (i in 0..size) {
- f(get(i)) print()
+ x := get(i)
+ f(x) print()
if (i < size - 1) ", " print()
- prount()
+ bbtrap()
}
")" println()
}
@@ -71,7 +72,7 @@ benchmark: func {
}
main: func {
- // demo()
- benchmark()
+ demo()
+ // benchmark()
}

0 comments on commit 4d54877

Please sign in to comment.