Non-Deterministic Functions as Non-Deterministic Processes (Extended Version) (Logical Methods in Computer Science, 2023)