diff -r b16dfc467b67 -r 5e2e576fac7c scala/turing.scala --- a/scala/turing.scala Sat Mar 02 10:42:39 2013 +0000 +++ b/scala/turing.scala Sun Mar 03 00:18:13 2013 +0000 @@ -65,7 +65,7 @@ // composition def ++ (that: TM) = TM(this.p ::: that.p) - def :+ (that: TM) = this.adjust ++ that.shift(this.p.length / 2 + 1) + def :+ (that: TM) = this.adjust ++ that.shift(this.p.length / 2) def shift(n: Int) = TM(p.map{case (a, s) => (a, if (s == 0) 0 else s + n)})