Erlang diff match and patch implementation