Exactly, and Abelson & Sussman describe this problem eloquently in their book, Structure and Interpretation of Computer Programs (section 1.1.7):
The contrast between function and procedure is a reflection of the general distinction between describing properties of things and describing how to do things, or, as it is sometimes referred to, the distinction between declarative knowledge and imperative knowledge.
In the footnotes they further elaborate on this, but the important takeaway point is that in the general case there may be no way to convert declarative knowledge to imperative knowledge. Indeed, if there were an easy way to do this, the whole field of computer programming would be obsolete.
Exactly, and Abelson & Sussman describe this problem eloquently in their book, Structure and Interpretation of Computer Programs (section 1.1.7):
In the footnotes they further elaborate on this, but the important takeaway point is that in the general case there may be no way to convert declarative knowledge to imperative knowledge. Indeed, if there were an easy way to do this, the whole field of computer programming would be obsolete.