anchor.diff:              } |> ignore
   
           member x.RunCommand cmd streamId =
  -            let eventData = new EventData(Guid.NewGuid(), typeof<PersonAddedEvent>.Name, true, serialize cmd, null)
  -            connection.AppendToStream(streamId, EventStore.ClientAPI.ExpectedVersion.NoStream, eventData)
  -            ()
  +            let cmdKey = cmd.GetType().FullName
  +            let result =
  +                match config.CommandHandlers |> Map.tryFind cmdKey with
  +                | Some handler -> 
  +                    let (stream, stateBuilder, handler') = handler cmd
  +                    let state = stateBuilder.Zero
  +                    handler' state
  +                | None -> 
  +                    Choice2Of2 (Seq.singleton <| sprintf "No handler for command: %A" cmdKey)
  +            match result with
  +            | Choice1Of2 events ->
  +                let eventDatas = 
  +                    events
  +                    |> Seq.map (fun e -> new EventData(Guid.NewGuid(), e.GetType().Name, true, serialize e, null)) 
  +                    |> Seq.toArray
  +
  +                async {
  +                    do! connection.AppendToStreamAsync(streamId, EventStore.ClientAPI.ExpectedVersion.NoStream, eventDatas).ContinueWith((fun _ -> true)) |> Async.AwaitTask |> Async.Ignore
  +                    return result
  +                }
  +            | _ -> 
  +                async {
  +                    return result
  +                }
  +
  +    type MyStateBuilder () =
  +        interface IStateBuilder with
  +            member this.Fold state evt = state
  +            member this.Zero = () :> obj
  +
  +        interface IComparable with
  +            member this.CompareTo(obj) = (this.GetType().FullName :> IComparable).CompareTo(obj.GetType().FullName)
   
       [<Fact>]
       let ``blah`` () : unit =
  
positive.code: 
      open FSharpx.Option
  
      type EventModel (connection : IEventStoreConnection) =
          let mutable handlers : Map<string, ResolvedEvent -> option<string * seq<obj>>> = Map.empty
  
          member x.RegisterHandler<'TEvt> (handler : 'TEvt -> option<string * seq<obj>>) =
  
negative.code:                 ParentId = Some parentId
              }
  
              do! model.RunCommand addParentCmd (parentId.ToString()) |> Async.Ignore
              do! model.RunCommand addChildCmd (childId.ToString()) |> Async.Ignore
  
              do! Async.Sleep(1000)
  
  