Functional programming, lazy expressions and thread pools for Python