Added TUPLE implementation.

Also fix a bug in the usage of binput' (which names previous values):
Empty lists which are meant to be appended to were named in the same
way as truly empty lists.