code: public static <K, V> Function<K, V> forMap(Map<K, V> map) {
  		return key -> {
  			if (map.containsKey(key)) {
  				return map.get(key);
  			} else {
  				throw new IllegalArgumentException("Key '" + key + "' not present in map");
  			}
  		};
  	}
docs: Returns a function which performs a map lookup. The returned function throws an {@link
  IllegalArgumentException} if given a key that does not exist in the map. See also {@link
  #forMap(Map, Object)}, which returns a default value in this case.