In place of algorithms in functional languages

I am trying to learn more rigorous programming topics as I realized that there are many paradigms that I know nothing about. I followed books like SICP and Computer Science Fundamentals etc. I am currently studying algorithms in a formal, evidence-based orientation. When I was learning Quicksort I realized that I have no idea how to implement this in a functional language. It is an in-place sorting algorithm, but how can I achieve this without mutation is beyond me.

Perhaps there is a simple answer, as long as I don't know many practical and theoretical concepts. But I read that functional languages ​​are based on the lambda calculus, and this is equivalent in strength to Turing machines. And I found an implementation in Haskell but I don't know about monads, I hope I find out eventually.

So could you explain how this is possible in the simplest possible terms? Does the lambda calculus itself have a concept of mutation? Don't be too harsh about this, because I don't know very well the lambda calculus just programmed into the Scheme. A yes or no answer with little explanation will suffice.

+3


source to share


1 answer


Does the lambda calculus itself have the concept of mutation?



No, there is no mutation. You just have an application (apply) function and an abstraction (lambda) function.

+1


source







All Articles