You are currently viewing Do you ever make use of Nested Functions?

Do you ever make use of Nested Functions?

This is a debate i am having with a colleague.

Kotlin allows you to define Nested Functions, functions which exist within the scope of another function. I believe it makes a large function much more readable by breaking the function into named blocks of code which can be reusable.

Basic example of Nested Function. The Nested Functions also have access to the input parameters.

https://preview.redd.it/l7td1vas48991.png?width=1518&format=png&auto=webp&s=1839cc7fdb15c3760e5d925f30953532250f704a

View Poll

submitted by /u/willor777
[link] [comments]