anchor.diff:              override x.Release() =
                   r.Dispose()
        
  -        type GroupByReader<'a, 'b>(scope : Ag.Scope, set : aset<'a * 'b>) =
  +        type OfASetReader<'a, 'b>(scope : Ag.Scope, set : aset<'a * 'b>) =
               inherit AbstractReader<hmap<'a, hset<'b>>, hdeltamap<'a, hset<'b>>>(scope, HMap.trace)
   
               let r = set.GetReader()
  
positive.code:             override x.Release() =
                  r.Dispose()
  
          type OfModReader<'a, 'b>(scope : Ag.Scope, input : IMod<hmap<'a, 'b>>) =
              inherit AbstractReader<hmap<'a, 'b>, hdeltamap<'a, 'b>>(scope, HMap.trace)
  
  
negative.code:                     last
          )
          
  [<AutoOpen>]
  module ``ASet -> AMap interop`` =
      open AMap.Implementation
      open AMap.Readers
  
      [<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
      [<RequireQualifiedAccess>]
      module ASet =
  
          let groupBy (f : 'a -> 'g) (s : aset<'a>) : amap<'g, hset<'a>> =
              if s.IsConstant then
                  constant <| lazy ( s.Content |> Mod.force |> Seq.groupBy (fun v -> f v :> obj) |> Seq.map (fun (g,vs) -> unbox<'g> g, HSet.ofSeq vs) |> HMap.ofSeq )
              else
                  amap <| function scope -> new GroupByReader<'a, 'g, 'a>(scope, s, fun v -> f v, v)
  
          let groupBy' (f : 'a -> 'g * 'b) (s : aset<'a>) : amap<'g, hset<'b>> =
              if s.IsConstant then
                  constant <| lazy ( s.Content |> Mod.force |> Seq.map f |> Seq.groupBy (fun (g,_) -> g :> obj) |> Seq.map (fun (g,vs) -> unbox<'g> g, vs |> Seq.map snd |> HSet.ofSeq) |> HMap.ofSeq )
              else
                  amap <| function scope -> new GroupByReader<'a, 'g, 'b>(scope, s, f)
  
  
  
  [<AutoOpen>]
  module AMapBuilderExperiments =
  