pure recursive implementations of Python and Haskell builtins, in Python