public static double SomeHardCoreComputation() { var data = new TheRealDataStore(); var result = 1.0; for (int i = 0; i < 10; i++) { var it = data.GetIt(i % 3) + 1; result *= it; } return result; }
public static void StoringABit(int i) { var realStorage = new TheRealDataStore(); if (i%2 == 0) { realStorage.Store(i); } else { realStorage.Store(-i); } }