modified: ../../bytecode/javFiles/Y.jav

Anwendung von Y eingefuegt.
This commit is contained in:
pl@gohorb.ba-horb.de 2019-09-19 13:57:49 +02:00
parent 0903efda0d
commit 37f8f2e1e0

View File

@ -8,8 +8,21 @@ class Y {
y = f -> t -> f.apply(y.apply(f)).apply(t);
//factorial = y.apply(f -> n -> { if (n == 0) return 1; else return n * f.apply(n - 1); });
}
getY() {
return y;
}
}
class fac1 {
factorial;
fac1() {
var y;
y = new Y<Integer,Integer,Integer,Integer,Integer>().getY();
factorial = y.apply(f -> n -> { if (n == 0) return 1; else return n * f.apply(n - 1); });
}
}
/*
ergibt Parse-Error
class fac1 {