In FP, What is the difference between a function and a procedure?
Answer Posted / Akash Negi
In functional programming (FP), functions are first-class citizens with well-defined inputs and outputs, while procedures do not have a clearly defined return type. Functions can be higher-order, meaning they take other functions as arguments or return them as results. Procedures, on the other hand, typically modify the state outside of their own scope.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers