Port another turmite exercise.

Also, pass the tables as parameters instead of doing that it's crude
but could help for performance (which I don't really believe).