Helpers for functional programming in Python