Bind parameters in BiXXX (lifting)

Boaz Nahum boaznahum at gmail.com
Mon Nov 19 00:53:09 PST 2012


If find it usfull in some places if I can convert BiXXX to unary, for
example

 public interface BiFunction<T, U, R> {

        R map(T t, U u);

        Function<U, R> bind1(T p1) default { return (u) -> {return
map(p1,u); }; }
    }

---------------------

       BiFunction<Integer, Integer, Integer> add = (a,b)->{return  ((int)a)
+ b;};

        Function<Integer, Integer> inc = add.bind1(1);


Thanks
Boaz


More information about the lambda-dev mailing list