@@ -0,0 +1,329 @@
+package org.psjava.algo.math;%0D%0A%0D%0Aimport org.psjava.ds.map.Map;%0D%0Aimport org.psjava.ds.math.Function;%0D%0A%0D%0Apublic class FunctionFromMap %7B%0D%0A%0D%0A%09public static %3CI, O%3E Function%3CI, O%3E wrap(final Map%3CI, O%3E flow) %7B%0D%0A%09%09return new Function%3CI, O%3E() %7B%0D%0A%09%09%09@Override%0D%0A%09%09%09public O get(I input) %7B%0D%0A%09%09%09%09return flow.get(input);%0D%0A%09%09%09%7D%0D%0A%09%09%7D;%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

add a util class