anchor.diff:  
               latestValue, self
           )
  +
  +    let withCancellation (ct : CancellationToken) =
  +        let m = Mod.init false
  +        let reg = ct.Register(fun () -> transact (fun () -> Mod.change m true))
  +
  +        switchTrue (latest m)
  +            (stop |> mapIn (fun _ -> reg.Dispose()))
  +            (arr id)
  +
  +
   
       type private Reactimator<'a, 'b>(sf : sf<'a, 'b>, input : 'a, output : 'b -> unit) as this =
           inherit AdaptiveObject()
  
positive.code:                     nv, switch gc onEvent nc
          )
  
      let rec integrate (seed : 's) (acc : 's -> 'a -> 's) (m : sf<'x, 'a>) =
          custom m.dependencies (fun _ ctx x ->
              let (mv,mc) = m.run ctx x
              let s = acc seed mv
              s, integrate s acc mc
          )
  
      let rec switchTrue (guard : sf<'a, bool>) (ifTrue : sf<'a, 'b>) (ifFalse : sf<'a, 'b>) =
          let deps = List.concat [guard.dependencies; ifTrue.dependencies; ifFalse.dependencies]
          custom deps (fun _ ctx a ->
              let (gv, gc) = guard.run ctx a
              if gv then
                  let (ev, ec) = ifTrue.run ctx a
                  ev, switchTrue gc ec ifFalse
  
              else
                  let (nv, nc) = ifFalse.run ctx a
                  nv, switchTrue gc ifTrue nc
          )
   
  
  
      let latest (m : IMod<'a>) : sf<'x, 'a> =
          custom [] (fun self ctx _ ->
  
negative.code:             member x.run _ _ = raise EndExn
              member x.dependencies = []   
  
      type private TimeSignal<'a> private() =
          static let instance = TimeSignal<'a>() :> sf<'a, DateTime>
  
          static member Instance = instance
  
          interface sf<'a, DateTime> with
              member x.run ctx _ = DateTime.Now, instance
              member x.dependencies = [Time]
  
  
      let time<'a> = TimeSignal<'a>.Instance
  
      let stop<'a, 'b> = EndSignal<'a, 'b>.Instance
  
  