forked from JavaTX/JavaCompilerCore
modified: ../../bytecode/javFiles/Y.jav
Anwendung von Y eingefuegt.
This commit is contained in:
parent
0903efda0d
commit
37f8f2e1e0
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user