Adding Java API for reduce, fold, apply and firstCompletedOf, adding << and apply() to CompletableFuture + a lot of docs

This commit is contained in:
Viktor Klang 2011-03-22 22:12:16 +01:00
parent 331f3e6469
commit e23ba6e5bb
3 changed files with 112 additions and 0 deletions

View file

@ -7,6 +7,13 @@ trait Function[T,R] {
def apply(param: T): R
}
/**
* A Function interface. Used to create 2-arg first-class-functions is Java (sort of).
*/
trait Function2[T1, T2, R] {
def apply(arg1: T1, arg2: T2): R
}
/** A Procedure is like a Function, but it doesn't produce a return value
*/
trait Procedure[T] {