Package hof.map.assignment
Class MapHof
java.lang.Object
hof.map.assignment.MapHof
public class MapHof
extends java.lang.Object
- Author:
- __STUDENT_NAME__, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
Constructors Constructor Description MapHof() -
Method Summary
Modifier and Type Method Description static <T, R> ImmutableList<R>map(java.util.function.Function<T,R> f, ImmutableList<T> list)Creates and returns a list whose contents are the result applying the Function f to each item in the specified list.
-
Constructor Details
-
MapHof
public MapHof()
-
-
Method Details
-
map
public static <T, R> ImmutableList<R> map(java.util.function.Function<T,R> f, ImmutableList<T> list)Creates and returns a list whose contents are the result applying the Function f to each item in the specified list. The order in the input must be preserved in the result.- Type Parameters:
T- input list item typeR- result list item type- Parameters:
f- function to apply each item.list- the specified list of items.- Returns:
- a list of the mapped results.
- See Also:
- SML map
-