I started writing an explanation about how nested functions are great, but at some point you stop making a distinction between `val a: A` and `val a: A =&gt; B` in the scope of a def.<p>A bunch of my code is interspersed with these function vals. It&#x27;s useful when within a function when you repeatedly apply the same transformation in multiple places. It kinda makes the code easier to read once you stop making that distinction.<p>re:short functions - I am not as much in favor of them as I used to be before. IMO, splitting functions into smaller ones are fine as long as there is some &quot;meaning&quot; to splitting them ( mostly related to your domain logic ). But I have stopped splitting functions just to make it smaller. When your code is referentially transparent, I think the size of your function really matters less.