remove trailing whitespace
possibly canonical code for interleaving tabling (mkit)

haven't tested this yet, and there are a few other versions, but this
one looks the newest.