Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,22 @@
import util.ordering
native scala.collection.mutable.PriorityQueue
data Task( priority, description )
def comparator( Task(a, _), Task(b, _) )
| a > b = -1
| a < b = 1
| otherwise = 0
q = PriorityQueue( ordering(comparator) )
q.enqueue(
Task(3, 'Clear drains'),
Task(4, 'Feed cat'),
Task(5, 'Make tea'),
Task(1, 'Solve RC tasks'),
Task(2, 'Tax return')
)
while not q.isEmpty()
println( q.dequeue() )