Write a Turing machine simulator.
For simplicity we can assume statuses as integer, symbols as char, blank symbol equals whitespace
5-tuple in the form of current state, input symbol, next state, output symbol, direction (left or right) the order is not mandatory but specify if you swap it
The machine must stop when an unknown state is reached, no other halt condition allowed.
The tape is infinite in both directions and you can always read an empty character.
Input: the initial tape, an initial state and a program. you are free to read the data from anywhere in the format you like
Output: the tape after the execution of the program
Required: an example program that run on top of your simulator
This is a code-colf so the shortest code win.
I'll post an implementation and some example programs in the next few hours.