anchor.diff:            let! moven = ie.MoveNext() 
             b := moven }
   
  +  type TryWithState =
  +     | NotStarted    = -1
  +     | HaveBodyEnumerator = 0
  +     | Finished = 1
  +     | PreHandler = 2
  +     | HaveHandlerEnumerator = 3
  +
     /// Implements the 'TryWith' functionality for computation builder
     // this pushes the handler through all the async computations
     let tryWith (inp: AsyncSeq<'T>) (handler : exn -> AsyncSeq<'T>) : AsyncSeq<'T> = 
           { new IAsyncEnumerable<'T> with 
                 member x.GetEnumerator() = 
  -                  let state = ref -1
  +                  let state = ref TryWithState.NotStarted
                     let enum = ref Unchecked.defaultof<IAsyncEnumerator<'T>>
  -                  // state -1: not started
  -                  // state 0: have body enumerator
  -                  // state 1: finished
  -                  // state 2: exception happened, about to get handler enumerator
  -                  // state 3: have handler enumerator
                     { new IAsyncEnumerator<'T> with 
                           member x.MoveNext() = 
                               async { match !state with 
  -                                    | -1 -> 
  +                                    | TryWithState.NotStarted -> 
                                           let res = ref Unchecked.defaultof<_>
                                           try 
                                               res := Choice1Of2 (inp.GetEnumerator())
  
positive.code: 
  
    let delay (f: unit -> AsyncSeq<'T>) : AsyncSeq<'T> = 
          { new IAsyncEnumerable<'T> with 
                member x.GetEnumerator() = f().GetEnumerator() }
  
    let bindAsync (f: 'T -> AsyncSeq<'U>) (inp : Async<'T>) : AsyncSeq<'U> = 
          { new IAsyncEnumerable<'U> with 
                member x.GetEnumerator() = 
                    let state = ref -1
                    // state -1 = not started
                    // state 0 = have result enumerator
                    // state 1 = finished
                    let enum = ref Unchecked.defaultof<IAsyncEnumerator<'U>>
                    { new IAsyncEnumerator<'U> with 
                          member x.MoveNext() = 
                              async { match !state with 
                                      | -1 -> 
                                          let! v = inp 
                                          return! 
                                             (let s = f v
                                              let e = s.GetEnumerator()
                                              enum := e
                                              state := 0
                                              x.MoveNext())
                                      | 0 ->   
                                          let! res = enum.Value.MoveNext() 
                                          return (match res with
                                                  | None -> 
  
negative.code:                                         return None }
                          member x.Dispose() = 
                              match !state with 
                              | BindState.HaveEnumerator -> 
                                  let e = enum.Value
                                  state := BindState.Finished
                                  enum := Unchecked.defaultof<_>
                                  dispose e 
                              | _ -> () } }
  