How do you implement immutability and higher-order functions in Python?

Technical