0

I am writing a program that uses the sums of the reciprocals of factorials to approximate e. Due to Haskell's better implementation of recursion than object-oriented languages, I've used it for the computation aspect of the program. Is there any way that I can integrate Haskell and Python so that some Haskell functions are used while Python handles user input and output? Any help is appreciated.

edit: I found many of the solutions in the linked post a bit above me, but I've reworked the algorithm to use a while loop. Thank you for your suggestions!

  • 1
    Take a look at this question: http://stackoverflow.com/questions/5015447/calling-haskell-functions-from-python – Gianluca Dec 20 '16 at 14:13
  • 2
    It is not object-oriented languages that have a problem with recursion, it is Python's implementation (or more specifically, lack of tail call optimization). Whatever you are implementing recursively can be done iteratively instead in Python. – chepner Dec 20 '16 at 14:37

0 Answers0