forked from JavaTX/JavaCompilerCore
bc2cab8c95
modified: src/de/dhbwstuttgart/syntaxtree/factory/UnifyTypeFactory.java modified: src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java modified: test/javFiles/Lambda.jav modified: test/javFiles/Lambda3.jav
24 lines
427 B
Java
24 lines
427 B
Java
import java.lang.String;
|
|
|
|
public class Lambda2
|
|
{
|
|
/*
|
|
public static <A> List<A> map(List<? extends A> input,
|
|
Function<? super A, ? extends A> func){
|
|
input.add(func.apply(input.get()));
|
|
}
|
|
*/
|
|
public map(input,func){
|
|
input.add(func.apply(input.get()));
|
|
return map(new List<String>(), func);
|
|
}
|
|
}
|
|
|
|
class List<A>{
|
|
A get();
|
|
void add(A);
|
|
}
|
|
|
|
class Function<A,B>{
|
|
B apply(A a);
|
|
} |