FunctionEither

Either of functions, which returns an Either.

Constructors

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

Members

Functions

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

Variables

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

Examples

static real lreal(int x)
{
	import std.math;
	return PI * x;
}
static string rstring(int x)
{
	import std.conv;
	return x.to!string;
}
auto fl = RealFunction!lreal.get.functionEitherLeft!string;
auto fr = RealFunction!rstring.get.functionEitherRight!real;
static assert (is (typeof (fl) == typeof (fr)));

Meta