anchor.diff:  
   type GroupedItems<'TGroup, 'TItem when 'TGroup : comparison> = {
       Items: Map<'TGroup, List<'TItem>>
  -    ItemCount: int
   }
   with static member ContainsGroup (group: 'TGroup) (groupedItems:GroupedItems<'TGroup, 'TItem>) = 
           groupedItems.Items |> Map.containsKey group
  
positive.code:                 groupedItems.Items |> Map.add group (List.append items groupedItems.Items.[group])
              else
                  groupedItems.Items |> Map.add group items
          { Items = newItems; ItemCount = groupedItems.ItemCount + items.Length }
       static member Remove (group: 'TGroup) (groupedItems:GroupedItems<'TGroup, 'TItem>) =
          if(groupedItems.Items |> Map.containsKey group) then
              //Console.WriteLine("Removed group {0}",group)
              let itemsInGroup = groupedItems.Items.[group].Length
              { 
                  Items = groupedItems.Items |> Map.remove group
                  ItemCount = groupedItems.ItemCount - itemsInGroup
              }
          else
              // Console.WriteLine("Group missing {0}",group)
  
negative.code:             chooseState(newState)
  
          and chooseState(runningState) = 
              if(runningState.AvailableWorkQueue.IsEmpty) then
                  noWorkAvailable(runningState)
              else
                  workAvailable(runningState)
  
          noWorkAvailable(empty)
      )
  
      let rec boundedWorkQueue = new BoundedWorkQueue<('TGroup * 'TItem)>(maxItems, postWorkToAgent)
  