https://kotlinlang.org logo
c

cygnus

07/22/2017, 5:09 PM
if there is some method that the "exp" variable has that can add itself to "containerList" then you could rewrite it as:
Copy code
if(container.type === Container.Type.EXERCISE)
    providedContainers.find { it.type === Container.Type.EXPLAIN }?.<add itself to container list method here>