anchor.diff:      Async.setMain ctx
       onEvent.RemoveHandler handler
   
  +  module Stream =
  +    module Var =
  +      let updateFun v f =
  +        Stream.Var.get v |> f |> Stream.Var.set v
  +
   type Item = {
  -    IsCompleted: Stream.Var<bool>
  -    Header: Stream.Var<string>
  +    IsCompleted: bool
  +    Header: string
     }
  +
  +module Id =
  +  let mutable private id = 0L
  +  let next () = Interlocked.Increment &id
   
   [<STAThread; EntryPoint>]
   let main argv =
  
positive.code: 
  [<AutoOpen>]
  module internal Util =
    type IDictionary<'k, 'v> with
      member this.TryGet k =
        match this.TryGetValue k with
         | (false, _) -> None
         | (_, v) -> Some v
      member this.Add (kvs: seq<'k * 'v>) =
        kvs |> Seq.iter this.Add
    module Dictionary =
      let create kvs =
        let d = Dictionary<_, _>()
        d.Add kvs
        d
  
    let setupWhen (onEvent: IEvent<_, _>) =
      let mainCtx = ivar ()
      let handler =
  
negative.code: // choice stream usage patterns.  WPF is fundamentally an imperative UI
  // framework and this example does not try to rewrite WPF as a more declarative
  // framework.  Some of the simple techniques used in this example, such using an
  // immutable map as the model and removing and adding all controls to a panel
  // when the model changes, do not necessarily scale.  Would have used XAML type
  // provider, but it currently does not mix with PCL.
  //
  // See also: https://github.com/tastejs/todomvc/blob/master/app-spec.md
  