equal
deleted
inserted
replaced
45 case ('[', l) => jumpLeft(prog, p - 1, l - 1) |
45 case ('[', l) => jumpLeft(prog, p - 1, l - 1) |
46 case (']', l) => jumpLeft(prog, p - 1, l + 1) |
46 case (']', l) => jumpLeft(prog, p - 1, l + 1) |
47 case (_, l) => jumpLeft(prog, p - 1, l) |
47 case (_, l) => jumpLeft(prog, p - 1, l) |
48 } |
48 } |
49 } |
49 } |
|
50 |
50 |
51 |
51 |
52 |
52 // (2c) Complete the run function that interpretes (runs) a brainf*** |
53 // (2c) Complete the run function that interpretes (runs) a brainf*** |
53 // program: the arguments are a program, a program counter, |
54 // program: the arguments are a program, a program counter, |
54 // a memory counter and a brainf*** memory. It Returns the |
55 // a memory counter and a brainf*** memory. It Returns the |