back to the school

src/Replay.fs

   1  module Replay
   2  
   3  /// Replay visits entries in the order they were recorded.
   4  /// Each step uses the balance left by the step before it.
   5  let replay (start: int) (deltas: int list) =
   6    List.fold (+) start deltas
   7  
   8  /// An empty list leaves the starting balance alone.
   9  let emptyReplay (start: int) = List.fold (+) start []
  10