Extensional and Non-extensional Functions as Processes (Logical Methods in Computer Science, 2025)