prompt (the prefix) and the code after the cursor as suffix; Mercury Edit 2 returns the text that belongs in between. This is what powers inline autocomplete in an editor.
FIM vs. Next Edit
FIM has no separate fields for edit history or other open files. Add any extra context directly to
prompt, such as imports, related types, or a short description of the intended code. Use Next Edit when the suggestion should incorporate edit history or recently viewed snippets.factorial up to return n * and the suffix is the call that uses it. Mercury Edit 2 fills the gap — e.g. factorial(n - 1).