diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..eaf91e2 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..a176339 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..1a709a0 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..c03f76b --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..c8397c9 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/main/kotlin/mate/academy/ProcessAndFilterNumbers.kt b/src/main/kotlin/mate/academy/ProcessAndFilterNumbers.kt index 20d40f2..583a7b0 100644 --- a/src/main/kotlin/mate/academy/ProcessAndFilterNumbers.kt +++ b/src/main/kotlin/mate/academy/ProcessAndFilterNumbers.kt @@ -1,5 +1,10 @@ package mate.academy +const val ZERO = 0 +const val TWO = 2 +const val FILTER_BY = 25 fun processAndFilterNumbers(numbers: List): List { - + return numbers.map { if (it % TWO == ZERO) it / TWO else it * TWO} + .filter { it > FILTER_BY } + .toList() }