InterviewSolution
Saved Bookmarks
| 1. |
What is a local function? |
|
Answer» SCALA has a feature to define a function in the body of another function. The scope of these functions are the declaring function only. That is they are not accessible from anywhere else in the CODE. These functions are called local functions. Here, the recursive function gcd() inside gcdList() is a local function. |
|