public static OnDemand <int> AddOne(OnDemand <int> onDemand) { var unwrapped = onDemand._func(); var result = unwrapped + 1; return(Create(result)); }
public static OnDemand <int> AddOneCorrect(OnDemand <int> onDemand) { return(new OnDemand <int>(() => { int unwrapped = onDemand.Value; int result = unwrapped + 1; return result; })); }