JavaCompilerCore/resources/javFiles/Lambda2.jav

33 lines
548 B
Plaintext
Raw Normal View History

import java.lang.String;
2017-05-31 15:10:50 +00:00
public class Lambda2
{
public static void main(List<String> args){
2017-09-25 21:47:38 +00:00
var listOfStrings = new List<String>();
var listOfObjects;
listOfObjects = map(listOfStrings, (a) -> a);
2017-05-31 15:10:50 +00:00
}
public map(a , b){
b.apply(a);
return a;
}
2017-05-31 15:10:50 +00:00
/*
public static <I,O> List<O> map(List<I> input, Function<I,O> func) {
List<O> output;
output = new List<O>();
output.add(func.apply(input.get()));
return output;
}
*/
}
class List<A>{
A get();
void add(A);
}
class Function<A,B>{
B apply(A a);
}