doc: Fix documentation pseudocode to match description.