
5 Jun
2012
5 Jun
'12
2:54 a.m.
It's likely the while loop can be replaced with a fold which has a Map (or IntMap if the key is an Int) as the accumulator. For a large Map you will need to pay attention to inserting elements strictly... The more complicated bit is without any extra knowledge about the implementation of the "database" `get_next_from_db()` is currently magic.