an implementation of Turing-machine with list-operations