public double Area
{
get { return this.Length * this.Width; }
}


static long Cube(int x) { return (long) x * x * x; }
static double Halve(long y) { return y / 2.0; }


static double HalveTheCube(int x) { return Halve(Cube(x)); }


Func<int, long> cube = x => (long) x * x * x;
Func<long, double> halve = y => y / 2.0;
Func<int, double> both = z => halve(cube(z));


static Func<X, Z> Compose<X, Y, Z>(Func<X, Y> f, Func<Y, Z> g)
{
return x => g(f(x));
}


Func<int, long> cube = x => (long) x * x * x;
Func<long, double> halve = y => y / 2.0;
Func<int, double> both = Compose(cube, halve);


Func<int, Nullable<double>> log = x => x > 0
? new Nullable<double>(Math.Log(x))
: new Nullable<double>();
Func<double, Nullable<decimal>> toDecimal = y => Math.Abs(y) < decimal.MaxValue
? new Nullable<decimal>((decimal)y)
: new Nullable<decimal>();
Func<int, Nullable<decimal>> both = Compose(log, toDecimal);


static Func<X, Nullable<Z>> ComposeSpecial<X, Y, Z>(Func<X, Nullable<Y>> f, Func<Y, Nullable<Z>> g)
{
return x => ApplySpecialFunction(f(x), g);
}


Func<X, M<Y>> f = whatever;
Func<Y, M<Z>> g = whatever;
M<X> mx = whatever;
M<Y> my = ApplySpecialFunction(mx, f);
M<Z> mz1 = ApplySpecialFunction(my, g);
Func<X, M<Z>> h = ComposeSpecial(f, g);
M<Z> mz2 = ApplySpecialFunction(mx, h);


1. 存在一种简单的构造机制能将任意的T转换为Monadic<T>static M<T> CreateSimpleM<T>(T t)
2. 我们可以将一个接受T的函数应用给Monadic<T>static M<R> ApplySpecialFunction<A, R>(M<A> monad, Func<A, M<R>> function)

1. 将构造函数(这里指的是构造Monadic<T>的简单函数)应用在一个Monadic<T>上应当返回一个语义一致的Monadic<T>
2. 将一个函数应用在构造函数产生的值与直接应用在那个值本身上应当产生语义一致的Monadic类型的值
3. 对一个值依次应用两个函数，应当和对这个值应用两个函数的组合函数产生两个语义一致的Monadic类型的值

E ti amerò comunque lo so, anche se non sei con me