In FP, What is the difference between a function and a procedure?
Answer / 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 |
What does set in scala collection?
Mention the types of variables in scala?
Explain the use of tuples in scala?
Explain the difference between function and method in scala?
What is an Expression? What is a Statement? Difference between Expression and Statement?
How do we make a call to a private primary constructor in scala?
Describe loops in scala?
What is an anonymous object in scala?
Does scala and java support call-by-name?
What does map in scala collection?
What do you mean by option in scala and why it is used?
What is the diamond problem in scala?