Pseudocode for the Edit test