Adding Java API for reduce, fold, apply and firstCompletedOf, adding << and apply() to CompletableFuture + a lot of docs
This commit is contained in:
parent
331f3e6469
commit
e23ba6e5bb
3 changed files with 112 additions and 0 deletions
|
|
@ -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] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue