This can be written as follows:

    executors.find(appId + "/" + execId).map(executor => executor.kill())