I am currently working my way through Structure and Interpretation of Computer Programs doing both the book and lectures from Brian Harvey(who is hilarious at points), however I have yet to truly have my "aha! moment" with differentiating functions and procedures.
Now I have done my research outside of the lectures and readings and came across a few different posts regarding this same question, but all seem to branch out into separate discussions/opinions on the true interpretation or outdated definitions. A general answer I have seen is that functions return a value and procedures do not, however that does not clear up much for me and most users on that response seemed to have some arguments against that answer.
Diving into higher order procedures within the text and lectures I completely understand the concept and the power this makes available, however I am confused because I will hear "Higher Order Procedures" and "Higher Order Functions". Brian Harvey also mentioned that "A higher order procedure represents a higher order function".
I understand that the two functions below are the same function, but different procedures.
f(x) = 2x + 6
g(x) = 2(x + 3)
Now below, make-adder is referred to as a procedure with a num as it's formal parameter. The domain of make-adder is numbers, the range is procedures. I guess what is really stumping me is he refers to the lambda expression as exactly that, a lambda expression, but make-adder is returning a procedure?
(define (make-adder num)
(lambda (x) (+ x num))
(define plus3 (make-adder 3))
(plus3 8)
I thought I had a clear understanding until a few references to procedures during the higher order procedures lessons and that has since fogged things up.
Any help differentiating the two with a possible example? Thank you!