Please, just keep in mind that I'm ramping up on functional programming hehe.
I have defined a Mutable list like this:
var list: MutableList<E>? = null
So, when I try to use list!!.add(E())
this throws a
kotlin.KotlinNullPointerException.
I understand that this is because I assign null to this list when I define it but a didn't get with a right solution thinking about on functional programming aspects how to solve this. Can you suggest me some code or concepts to achieve this situation.