UncurriedFunction

Uncurry a function.

  1. class UncurriedFunction(A, B, C)
  2. auto uncurry(F f)

Constructors

this
this(Function!(A, Function!(B, C)) curried)
Undocumented in source.

Members

Functions

opCall
C opCall(Tuple!(A, B) x)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

curried
Function!(A, Function!(B, C)) curried;
Undocumented in source.

Examples

static class G : Function!(int, Function!(int, int))
{

	class g : Function!(int, int)
	{
		int x;
		this (int x)
		{
			this.x = x;
		}
		override int opCall(int x)
		{
			return this.x + x;
		}
	}
	override Function!(int, int) opCall(int x)
	{
		return new g(x);
	}
	mixin Singleton;
}
auto ug = G.get.uncurry;
static assert (is (typeof (ug) : Function!(Tuple!(int, int), int)));

Meta