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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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 type
      R - 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