From f629b76658985693add1a901a518c97f4a0c56b3 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 29 Jul 2016 01:43:54 -0800 Subject: [PATCH] Refactor. --- .../main/kotlin/com/beust/kobalt/maven/aether/Aether.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt index 441e19b8..cd6bd0f4 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt @@ -58,10 +58,9 @@ enum class Scope(val scope: String, val dependencyLambda: (Project) -> List) : (Project) -> List { val result = { project : Project -> scopes.fold(arrayListOf(), - { l: ArrayList, scope: Scope -> - val deps = scope.dependencyLambda(project) - l.addAll(deps) - l + { list: ArrayList, scope: Scope -> + list.addAll(scope.dependencyLambda(project)) + list }) } return result