let transition_rule rule_num =
let table = wolfram_to_array rule_num in
fun neighbours configuration cell ->
let n = neighbours.(cell) in
assert (Array.length n = 2);
let index =
int_of_bool configuration.(n.(0)) lsl 2
+ int_of_bool configuration.(cell) lsl 1
+ int_of_bool configuration.(n.(1)) (*lsl 0*) in
table.(index)