back to the school

src/Oracle.fs

   1  module Oracle
   2  
   3  /// The oracle is a sum of the entries, not a call to the implementation.
   4  /// It stays correct when the implementation changes.
   5  let expected (start: int) (deltas: int list) =
   6    start + List.sum deltas
   7  
   8  /// Two runs with the same entries must reach the same total from the sum.
   9  let same (left: int list) (right: int list) (start: int) =
  10    (start + List.sum left) = (start + List.sum right)
  11