anchor.diff:      
   /////////////////////////////////////////////////////////////////////////
   
  -module Async =
  +module AsyncMb =
     type Stream<'a> = MailboxProcessor<AsyncReplyChannel<'a>>
     let inline take (s: Stream<'a>) = s.PostAndAsyncReply (fun x -> x)
   
  
positive.code:       next
  
    let sieve : Job<Stream<_>> =
      let rec sieve nats = Job.thunk <| fun () ->
        let prime = nats.Value
        {Value = prime;
         Next =
          Promise.Now.delay (nats.Next >>= filter (fun x -> x % prime <> 0) >>= sieve)}
      iterate (fun x -> x+1) 2 >>= sieve
  
    let primes n = Job.delay <| fun () ->
      let before = GC.GetTotalMemory true
  
negative.code: 
  /////////////////////////////////////////////////////////////////////////
  
  module HopacJob =
    type [<NoComparison>] Stream<'a> = {Value: 'a; Next: Job<Stream<'a>>}
  
    let rec iterate (step: 'a -> 'a) (init: 'a) : Job<Stream<_>> = Job.thunk <| fun () ->
      {Value = init;
       Next = iterate step (step init)}
  
    let rec filter (pred: 'a -> bool) (xs: Stream<'a>) : Job<Stream<'a>> =
      let next = xs.Next >>= filter pred
      if pred xs.Value then
        Job.result {Value = xs.Value; Next = next}
      else
        next
  
    let sieve : Job<Stream<_>> =
      let rec sieve nats =
        let prime = nats.Value
        {Value = prime;
         Next = nats.Next >>= filter (fun x -> x % prime <> 0) |>> sieve}
      iterate (fun x -> x+1) 2 |>> sieve
  
    let primes n = Job.delay <| fun () ->
      let before = GC.GetTotalMemory true
      let result = Array.zeroCreate n
      let rec loop i primes =
        if i < n then
          result.[i] <- primes.Value
          primes.Next >>= loop (i+1)
        else
          printf "%5d b/p " (max 0L (GC.GetTotalMemory true - before) / int64 n)
          Job.result result
      sieve >>= loop 0
  
    let run n =
      printf "JobStream:     "
      let timer = Stopwatch.StartNew ()
      let ps = run (primes n)
      let d = timer.Elapsed
      printf "%7d - %fs\n" ps.[ps.Length-1] d.TotalSeconds
      d
  
  /////////////////////////////////////////////////////////////////////////
  
  module HopacPromise =
    type [<NoComparison>] Stream<'a> = {Value: 'a; Next: Promise<Stream<'a>>}
  
  