diff --git a/kotlin/accumulate/.gradle/3.5/file-changes/last-build.bin b/kotlin/accumulate/.gradle/3.5/file-changes/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/kotlin/accumulate/.gradle/3.5/file-changes/last-build.bin differ diff --git a/kotlin/accumulate/.gradle/3.5/taskHistory/taskHistory.lock b/kotlin/accumulate/.gradle/3.5/taskHistory/taskHistory.lock new file mode 100644 index 0000000..40bfe70 Binary files /dev/null and b/kotlin/accumulate/.gradle/3.5/taskHistory/taskHistory.lock differ diff --git a/kotlin/accumulate/.gradle/buildOutputCleanup/built.bin b/kotlin/accumulate/.gradle/buildOutputCleanup/built.bin new file mode 100644 index 0000000..e69de29 diff --git a/kotlin/accumulate/.gradle/buildOutputCleanup/cache.properties b/kotlin/accumulate/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..34958ac --- /dev/null +++ b/kotlin/accumulate/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Sun Jun 04 16:28:56 EDT 2017 +gradle.version=3.5 diff --git a/kotlin/accumulate/.gradle/buildOutputCleanup/cache.properties.lock b/kotlin/accumulate/.gradle/buildOutputCleanup/cache.properties.lock new file mode 100644 index 0000000..40fdece --- /dev/null +++ b/kotlin/accumulate/.gradle/buildOutputCleanup/cache.properties.lock @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/compiler.xml b/kotlin/accumulate/.idea/compiler.xml new file mode 100644 index 0000000..e21680e --- /dev/null +++ b/kotlin/accumulate/.idea/compiler.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/gradle.xml b/kotlin/accumulate/.idea/gradle.xml new file mode 100644 index 0000000..20d2df6 --- /dev/null +++ b/kotlin/accumulate/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/libraries/Gradle__junit_junit_4_12.xml b/kotlin/accumulate/.idea/libraries/Gradle__junit_junit_4_12.xml new file mode 100644 index 0000000..04c10dd --- /dev/null +++ b/kotlin/accumulate/.idea/libraries/Gradle__junit_junit_4_12.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml b/kotlin/accumulate/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 0000000..8262f72 --- /dev/null +++ b/kotlin/accumulate/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml new file mode 100644 index 0000000..4f32fde --- /dev/null +++ b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_1_1.xml b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_1_1.xml new file mode 100644 index 0000000..7b6f562 --- /dev/null +++ b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_1_1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_test_1_1_1.xml b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_test_1_1_1.xml new file mode 100644 index 0000000..1720158 --- /dev/null +++ b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_test_1_1_1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_test_junit_1_1_1.xml b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_test_junit_1_1_1.xml new file mode 100644 index 0000000..21c5d19 --- /dev/null +++ b/kotlin/accumulate/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_test_junit_1_1_1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/misc.xml b/kotlin/accumulate/.idea/misc.xml new file mode 100644 index 0000000..84da703 --- /dev/null +++ b/kotlin/accumulate/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/modules.xml b/kotlin/accumulate/.idea/modules.xml new file mode 100644 index 0000000..c94dfdf --- /dev/null +++ b/kotlin/accumulate/.idea/modules.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/modules/accumulate_main.iml b/kotlin/accumulate/.idea/modules/accumulate_main.iml new file mode 100644 index 0000000..25aaa50 --- /dev/null +++ b/kotlin/accumulate/.idea/modules/accumulate_main.iml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/modules/accumulate_test.iml b/kotlin/accumulate/.idea/modules/accumulate_test.iml new file mode 100644 index 0000000..c7fa7d2 --- /dev/null +++ b/kotlin/accumulate/.idea/modules/accumulate_test.iml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/.idea/workspace.xml b/kotlin/accumulate/.idea/workspace.xml new file mode 100644 index 0000000..06ecff7 --- /dev/null +++ b/kotlin/accumulate/.idea/workspace.xml @@ -0,0 +1,854 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Ignore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1496608125326 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/accumulate.iml b/kotlin/accumulate/accumulate.iml new file mode 100644 index 0000000..9f93cf7 --- /dev/null +++ b/kotlin/accumulate/accumulate.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/kotlin/accumulate/build/classes/main/Accumulate.class b/kotlin/accumulate/build/classes/main/Accumulate.class new file mode 100644 index 0000000..5b3d5e5 Binary files /dev/null and b/kotlin/accumulate/build/classes/main/Accumulate.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateReversedStrings$1.class b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateReversedStrings$1.class new file mode 100644 index 0000000..c80d749 Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateReversedStrings$1.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateSquares$1.class b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateSquares$1.class new file mode 100644 index 0000000..96544e1 Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateSquares$1.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateToDifferentType$1.class b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateToDifferentType$1.class new file mode 100644 index 0000000..4d27176 Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateToDifferentType$1.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateUpperCases$1.class b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateUpperCases$1.class new file mode 100644 index 0000000..9881adb Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateUpperCases$1.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateWithinAccumulate$1$1.class b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateWithinAccumulate$1$1.class new file mode 100644 index 0000000..38d6cde Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateWithinAccumulate$1$1.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateWithinAccumulate$1.class b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateWithinAccumulate$1.class new file mode 100644 index 0000000..8c9cfc4 Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest$accumulateWithinAccumulate$1.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest$emptyAccumulateProducesEmptyAccumulation$1.class b/kotlin/accumulate/build/classes/test/AccumulateTest$emptyAccumulateProducesEmptyAccumulation$1.class new file mode 100644 index 0000000..df79ecf Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest$emptyAccumulateProducesEmptyAccumulation$1.class differ diff --git a/kotlin/accumulate/build/classes/test/AccumulateTest.class b/kotlin/accumulate/build/classes/test/AccumulateTest.class new file mode 100644 index 0000000..db88707 Binary files /dev/null and b/kotlin/accumulate/build/classes/test/AccumulateTest.class differ diff --git a/kotlin/accumulate/build/kotlin-build/caches/version.txt b/kotlin/accumulate/build/kotlin-build/caches/version.txt new file mode 100644 index 0000000..01aabac --- /dev/null +++ b/kotlin/accumulate/build/kotlin-build/caches/version.txt @@ -0,0 +1 @@ +11001 \ No newline at end of file diff --git a/kotlin/accumulate/src/main/kotlin/Accumulate.kt b/kotlin/accumulate/src/main/kotlin/Accumulate.kt new file mode 100644 index 0000000..9c9bb76 --- /dev/null +++ b/kotlin/accumulate/src/main/kotlin/Accumulate.kt @@ -0,0 +1,9 @@ +object Accumulate { + fun accumulate(inpList: List, func: (T) -> R): List { + var outList: MutableList = emptyList().toMutableList() + for (i in inpList){ + outList.add(func(i)) + } + return outList + } +} \ No newline at end of file diff --git a/kotlin/accumulate/src/test/kotlin/AccumulateTest.kt b/kotlin/accumulate/src/test/kotlin/AccumulateTest.kt index 665ea44..85cdf89 100644 --- a/kotlin/accumulate/src/test/kotlin/AccumulateTest.kt +++ b/kotlin/accumulate/src/test/kotlin/AccumulateTest.kt @@ -12,7 +12,7 @@ class AccumulateTest { assertEquals(expectedOutput, Accumulate.accumulate(input, { x -> x * x })) } - @Ignore + @Test fun accumulateSquares() { val input = listOf(1, 2, 3) @@ -20,7 +20,7 @@ class AccumulateTest { assertEquals(expectedOutput, Accumulate.accumulate(input, { x -> x * x })) } - @Ignore + @Test fun accumulateUpperCases() { val input = listOf("hello", "world") @@ -28,7 +28,7 @@ class AccumulateTest { assertEquals(expectedOutput, Accumulate.accumulate(input, { it.toUpperCase() })) } - @Ignore + @Test fun accumulateReversedStrings() { val input = "the quick brown fox etc".split(" ") @@ -36,7 +36,7 @@ class AccumulateTest { assertEquals(expectedOutput, Accumulate.accumulate(input, { it.reversed() })) } - @Ignore + @Test fun accumulateWithinAccumulate() { val input1 = listOf("a", "b", "c") @@ -47,7 +47,7 @@ class AccumulateTest { )) } - @Ignore + @Test fun accumulateToDifferentType() { val input = listOf(1, 2, 3) diff --git a/kotlin/word-count/.idea/workspace.xml b/kotlin/word-count/.idea/workspace.xml index 3a0e964..2ae745a 100644 --- a/kotlin/word-count/.idea/workspace.xml +++ b/kotlin/word-count/.idea/workspace.xml @@ -442,7 +442,7 @@ - + @@ -844,7 +844,7 @@ -