exps/both.scala
changeset 317 db0ff630bbb7
parent 314 20a57552d722
child 330 89e6605c4ca4
--- a/exps/both.scala	Sat Mar 16 11:15:22 2019 +0000
+++ b/exps/both.scala	Thu Apr 11 17:37:00 2019 +0100
@@ -352,15 +352,13 @@
   case (ONE, bs) => (Empty, bs)
   case (PRED(f, _), C(c)::bs) => (Chr(c), bs)
   case (ALTS(r::Nil), bs) => decode_aux(r, bs)
-  case (ALTS(rs), bs) => bs match {
-    case Z::bs1 => {
+  case (ALTS(rs), Z::bs1) => {
       val (v, bs2) = decode_aux(rs.head, bs1)
       (Left(v), bs2)
     }
-    case S::bs1 => {
+  case (ALTS(rs), S::bs1) => {
       val (v, bs2) = decode_aux(ALTS(rs.tail), bs1)
-      (Right(v), bs2)			
-    }
+      (Right(v), bs2)	
   }
   case (SEQ(r1, r2), bs) => {
     val (v1, bs1) = decode_aux(r1, bs)