In FP, What is the difference between a function and a procedure?



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

Post New Answer

More Scala Interview Questions

What is the current latest version of scala? What is the major change or update in scala 2.12?

0 Answers  


What is Monad in Scala?

1 Answers  


What square measure the Scala variables?

1 Answers  


What is a closure?

1 Answers  


Explain the use of tuples in scala?

1 Answers  


Which scala library is used for the functional programming?

1 Answers  


What do you mean by foldleft in scala?

1 Answers  


What is the difference between call-by-value and call-by-name function parameters?

1 Answers  


List the advantages of using scala over other functional programming languages.

1 Answers  


In Scala, Pattern Matching follows which Design Pattern? In Java, ‘isinstanceof’ operator follows which Design Pattern?

1 Answers  


How Scala supports both Highly Scalable and Highly Performance applications?

1 Answers  


What is Range in Scala? How to create a Range in Scala?

1 Answers  


Categories