anchor.diff:  open IntelliFactory.WebSharper
   
   type Result<'a> =
  -    | Success of 'a
  -    | Failure of string list
  -
  -    [<JavaScript>]
  -    member this.isSuccess =
  -        match this with
  -        | Success _ -> true
  -        | Failure _ -> false
  -
  +    {
  +        Value : 'a option
  +        Errors : string list
  +    }
  +
  +    [<JavaScript>]
  +    static member Success (x: 'a) =
  +        { Value = Some x; Errors = [] }
  +
  +    [<JavaScript>]
  +    static member Empty =
  +        { Value = None; Errors = [] }
  +
  +    [<JavaScript>]
  +    member this.IsSuccess =
  +        not this.Errors.IsEmpty
  +
  +module Result =
  +    [<JavaScript>]
  +    [<Inline>]
  +    let Value x = x.Value
  +
  +    [<JavaScript>]
  +    [<Inline>]
  +    let Errors x = x.Errors
  +
  +type Result<'a> with
       [<JavaScript>]
       static member Ap(r1: Result<'a -> 'b>, r2: Result<'a>) =
  -        match r1, r2 with
  -        | Success f, Success x -> Success(f x)
  -        | Failure m, Success _
  -        | Success _, Failure m -> Failure m
  -        | Failure m1, Failure m2 -> Failure(m1 @ m2)
  +        {
  +            Value =
  +                match r1.Value, r2.Value with
  +                | Some f, Some x
  +                    when r1.Errors.IsEmpty && r2.Errors.IsEmpty ->
  +                    Some (f x)
  +                | _ -> None
  +            Errors = r1.Errors @ r2.Errors
  +        }
   
       [<JavaScript>]
       static member Join (r: Result<Result<'a>>) =
  -        match r with
  -        | Failure m
  -        | Success (Failure m) -> Failure m
  -        | Success (Success x) -> Success x
  +        {
  +            Value = Option.bind Result.Value r.Value
  +            Errors = r.Errors @ defaultArg (Option.map Result.Errors r.Value) []
  +        }
   
   [<Interface>]
   type Reader<'a> =
  
positive.code: [<Sealed>]
  type Submitter<'a> [<JavaScript>] (input: Reader<'a>) =
  
      let output = Stream(Failure [])
  
      let writer =
          ConcreteWriter(fun unitIn ->
              match unitIn, input.Latest with
              | Failure m1, Failure m2 -> output.Trigger(Failure(m1 @ m2))
              | Failure m, Success _
              | Success _, Failure m -> output.Trigger(Failure m)
              | Success(), Success x -> output.Trigger(Success x))
          :> Writer<unit>
  
      [<JavaScript>]
  
negative.code: 
      [<JavaScript>]
      let Yield (x: 'a) =
          let s = Stream(Result.Success x)
          {
              stream = s
              view = fun f -> f s
  