``` val eventNamesToEmit = mutableListOf<String...
# rx
a
Copy code
val eventNamesToEmit = mutableListOf<String>()

eventNamesToEmit.addAll(
    node.outgoingLinks
    .filter { it.checkCondition(messageBody) }
    .map { it.eventName }
)
mutable lists should always be questioned:
Copy code
val eventNamesToEmit = node.outgoingLinks.filter { ... }.map {...}
future.complete(if (eventNamesToEmit.isEmpty()) { ... } else { eventNamesToEmit })
Might be a helper method to shrink that if statement too
👍 1