3 ms·
The tape is probably more easily represented as a lambda sending a number n to the content of the nth cell initial_tape = λn. 0 read tape idx = tape id
by edflsafoiewq 8y ago
The tape is probably more easily represented as a lambda sending a number n to the content of the nth cell
initial_tape = λn. 0
read tape idx = tape idx
write tape idx x = λn. if n = idx then x else (tape n)