Question: please do not change any variables in the code. and finish as it is. For example, (static List map(Iterable l, Function f) {) for this
please do not change any variables in the code. and finish as it is. For example, (static List
Also, create a JUnit test file for this program.
Thanks
import java.util.List; import java.util.function.Function; import java.util.function.BiFunction; import java.util.function.Predicate;
public class hw2 { static List
static V foldLeft(V e, Iterablel, BiFunction
static V foldRight(V e, Listl, BiFunction f){ return null; }
static List filter(List l, Predicate p){ return null; }
static U binFoldLeft(U e, Listl, BiFunction f){ return null; }
public static void main(String[] args) { // Use map to implement the following behavior (described in Python). i.e given a List
}
}
class Person{ final int salary; final String name; Person(int salary, String name){ this.salary = salary; this.name = name; } int getSalary() { return salary; } String name() { return name;} }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
