anchor.diff:  ﻿namespace Eventful
   
   open System
  +
  +open FSharpx
   
   type GroupEntry<'TItem> = {
       Items : List<Int64 * 'TItem>
  
positive.code:             log.Error("Exception thrown by MutableOrderedGroupingBoundedQueueMessages", exn))
          theAgent
      
      member this.Add (input:'TInput, group: ('TInput -> (seq<'TItem * 'TGroup>)), ?onComplete : Async<unit>) =
          async {
              let items = group input
              let onCompleteCallback = async {
                  match onComplete with
                  | Some callback -> return! callback
                  | None -> return ()
              }
              do! dispatcherAgent.PostAndAsyncReply(fun ch ->  AddItem (items, onCompleteCallback, ch))
              ()
          }
  
      member this.Consume (work:(('TGroup * seq<'TItem>) -> Async<unit>)) =
          dispatcherAgent.PostAndAsyncReply(fun ch -> ConsumeWork(work, ch))
  
negative.code:                 let nextIndex = 
                      if Seq.length indexedItems > 0 then
                          let lastIndex = indexedItems |> Seq.map snd |> Seq.last
                          match onComplete with
                          | Some a -> lastCompleteTracker.NotifyWhenComplete(lastIndex, None, a)
                          | None -> ()
                          lastIndex + 1L
                      else
                          itemIndex
  
                  // there were not items keep moving
                  if(nextIndex = itemIndex) then 
                      match onComplete with
                      | Some a -> do! a
                      | None -> ()
  
                  return! (nextMessage nextIndex) }
              and groupComplete group itemIndex = async {
  