DEV Community

Discussion on: Functional programming and pure functions

 
pentacular profile image
pentacular

A procedure can never be called a function.

However, as I've said, you can use a procedure as a way to implement a function.

It's important to understand that it's still a procedure, and it's still executing a series of operations over time, as opposed to being a time-invariant relationship.

HOP (higher order procedures) can implement functions, while not being functions -- but the distinction remains.

I don't think we're particularly disagreeing, except on your use of "is" vs "implements".

Thread Thread
 
macsikora profile image
Pragmatic Maciej

Ok, yes I think your way of stating that is correct. Function can be implement by procedure. And .map can be co considered as HOF implementation if we use another transparently referencial procedure as an argument.