comments describing the role of each argument

This commit is contained in:
ansuz 2016-04-01 10:46:54 +02:00
parent df78d284c4
commit c50690349b
1 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,11 @@ define([
var validate = JsonOT.validate = function (text, toTransform, transformBy) {
try {
// text = O (mutual common ancestor)
// toTransform = A (the first incoming operation)
// transformBy = B (the second incoming operation)
// threeway merge (0, A, B)
var resultOp = ChainPad.Operation.transform0(text, toTransform, transformBy);
var text2 = ChainPad.Operation.apply(transformBy, text);
var text3 = ChainPad.Operation.apply(resultOp, text2);