     }
     
     /// Adjusts the sequencing of elements affected by a move operation.
-    mutating func moveFormulaElement(_ element: FormulaElement, fromIndex: Int, toIndex: Int) {
+    ///
+    /// - returns: A range of indices that have been affected by this operation
+    @discardableResult
+    mutating func moveFormulaElement(_ element: FormulaElement, fromIndex: Int, toIndex: Int) -> [Int] {
+        var indices: [Int] = []
+        
         guard fromIndex != toIndex else {
-            return
+            return indices
         }
         
         let elements = self.formula
         
         if toIndex < fromIndex {
             for i in toIndex..<fromIndex {
+                indices.append(i)
                 let formulaElement = elements[i]
                 let newSequence = i + 1
                 

        }
        
        self.updateSequence(element, sequence: toIndex)
    }
    
    /// A concatenation of all procedure element commentaries.

        }
        
        self.updateSequence(element, sequence: toIndex)
        indices.append(fromIndex)
        
        return indices
    }
}

