Regarding first-class functions in Scala, it is written in the book Programming by Scala:
A function literal is compiled into a class that when instantiated at run-time is a function value.
When there will be many first-class functions used in a program, will this affect the JVM's PermGen space? because instead of simple functions the compiler is generating classes for each variation of the function value (e.g. in the case of varied definitions of partially applied functions).