uk.co.jezuk.mango
Class BinaryFunctions

java.lang.Object
  extended by uk.co.jezuk.mango.BinaryFunctions

public class BinaryFunctions
extends java.lang.Object

The Mango Library Binary Functions

A BinaryFunction is some function taking two arguments - fn(T1 x, T2 y). It returns some R, and may return the same object or different objects for each invocation, even given the same arguments. It can refer to local state, perform disk reads or writes, or whatever.

Author:
Jez Higgins, jez@jezuk.co.uk
See Also:
BinaryFunction

Method Summary
static
<T1,R1,T2,R2,R>
BinaryFunction<T1,T2,R>
Compose(BinaryFunction<R1,R2,R> f, Function<T1,R1> g1, Function<T2,R2> g2)
          Compose is a function adaptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Compose

public static <T1,R1,T2,R2,R> BinaryFunction<T1,T2,R> Compose(BinaryFunction<R1,R2,R> f,
                                                              Function<T1,R1> g1,
                                                              Function<T2,R2> g2)
Compose is a function adaptor. If f is a BinaryFunction and g1 and g2 are Functions, then Compose returns a new BinaryFunction h such that h(x, y) is f(g1(x), g2(y))



Copyright © 2002-2010 JezUK Ltd.