This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyList<E> { | |
private E head = null; | |
private MyList<E> tail = null; | |
public static <Z> MyList<Z> nil() { | |
return new MyList<Z>(); | |
}; | |
public static <Z> MyList<Z> cons(Z head, MyList<Z> tail) { | |
MyList<Z> result = new MyList<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FunctionalInterface | |
interface ConstructorFuncInterface{ | |
public Employee createEmployee(int a, String b); | |
} | |
@FunctionalInterface | |
interface MethodFuncInterface{ | |
public int getInt(); | |
} |