functionEitherLeft

Either of functions, which returns an Either.

  1. class FunctionEither(A, B, C)
  2. auto functionEitherLeft(F f)
    functionEitherLeft
    (
    C
    F
    )
    (
    F f
    )
  3. auto functionEitherRight(F f)

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