diff -r 4b2496bc79b2 -r 3b1136fb6bee progs/app06.scala --- a/progs/app06.scala Wed Oct 21 16:09:44 2020 +0100 +++ b/progs/app06.scala Sat Oct 24 13:02:18 2020 +0100 @@ -5,17 +5,16 @@ (r1s, r2s) match { case (ZERO, _) => (ZERO, F_ERROR) case (_, ZERO) => (ZERO, F_ERROR) - case (ONE, _) => (r2s, F_SEQ_Void1(f1s, f2s)) - case (_, ONE) => (r1s, F_SEQ_Void2(f1s, f2s)) + case (ONE, _) => (r2s, F_SEQ_Empty1(f1s, f2s)) + case (_, ONE) => (r1s, F_SEQ_Empty2(f1s, f2s)) case _ => (SEQ(r1s,r2s), F_SEQ(f1s, f2s)) } } - ... - -def F_SEQ_Void1(f1: Val => Val, f2: Val => Val) = - (v:Val) => Sequ(f1(Void), f2(v)) -def F_SEQ_Void2(f1: Val => Val, f2: Val => Val) = - (v:Val) => Sequ(f1(v), f2(Void)) + ...} +def F_SEQ_Empty1(f1: Val => Val, f2: Val => Val) = + (v:Val) => Sequ(f1(Empty), f2(v)) +def F_SEQ_Empty2(f1: Val => Val, f2: Val => Val) = + (v:Val) => Sequ(f1(v), f2(Empty)) def F_SEQ(f1: Val => Val, f2: Val => Val) = (v:Val) => v match { case Sequ(v1, v2) => Sequ(f1(v1), f2(v2)) }