modified: resources/AllgemeinTest/Iteration.jav

This commit is contained in:
pl@gohorb.ba-horb.de 2023-06-05 15:25:55 +02:00
parent 3c86eecf8b
commit e13baa8acb

View File

@ -1,4 +1,4 @@
/*
class Pair<T, U> { class Pair<T, U> {
T x; T x;
U y; U y;
@ -17,20 +17,21 @@ class Pair<T, U> {
return y; return y;
} }
} }
*/
public class Iteration { public class Iteration {
m1(x, y) { m1(x, y) {
var help; var help;
help = m2(x, y); help = m2(x, y);
var y2 = help.snd(); var y2 = help.snd();
return new Pair<>(y2,x); return new Pair<>(x,y2);
} }
m2(x,y) { m2(x,y) {
var help = m1(x, y); var help = m1(x, y);
var x2 = help.fst(); var x2 = help.fst();
return new Pair<>(y, x2); return new Pair<>(x2, y);
} }
} }