public void Cache ()
{
#region NoCache
var randSeq = RandomValues (new Random (), 100);
// this could pass, but that's highly improbable
Assert.IsFalse (
randSeq.Take (10).SelectFromEach (randSeq.Take (10),
(l, r) => l + r)
.All (x => x % 2 == 0));
#endregion
#region Cache
// We can make the above sane by memoizing the sequence:
Assert.IsTrue (randSeq.Take (10).Cache ().With (c => c.SelectFromEach (c, (l, r) => l + r)).All (x => x % 2 == 0));
#endregion
}