Bohtvaroh

Blogger - Folding tree - 3

Jun 5th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.39 KB | None | 0 0
  1. object TreeToList {
  2.  
  3.   /* previous definitions omitted for brevity */
  4.  
  5.   val tree = generateTree((1 to 20).toList)
  6.  
  7.   def testToListSimple = toListSimple(tree)
  8.   def testToList = toList(tree)
  9. }
  10.  
  11. object toListSimpleTest extends testing.Benchmark {
  12.   def run() { TreeToList.testToListSimple }
  13. }
  14.  
  15. object toListTest extends testing.Benchmark {
  16.   def run() { TreeToList.testToList }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment