Kotlin - Finished Flatten Array

This commit is contained in:
Anthony C 2017-07-25 17:19:42 -04:00
parent 74b84a4290
commit 2eb0b89b53
41 changed files with 1199 additions and 53 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

View file

@ -0,0 +1,2 @@
#Tue Jul 25 16:41:43 EDT 2017
gradle.version=4.0.1

View file

@ -0,0 +1 @@


View file

@ -5,7 +5,7 @@
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="G:/Gradle/gradle-4.0.1" />
<option name="gradleHome" value="/usr/bin/gradle" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>

View file

@ -23,17 +23,4 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/../../out/production/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/main">
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/kotlin" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
</component>
</module>

View file

@ -23,23 +23,4 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output-test url="file://$MODULE_DIR$/../../out/test/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/test">
<sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/kotlin" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="diamond_main" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.1" level="project" />
<orderEntry type="library" name="Gradle: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-test-junit:1.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-test:1.1.1" level="project" />
</component>
<component name="TestModuleProperties" production-module="diamond_main" />
</module>

View file

@ -17,6 +17,7 @@
<ProjectState />
</projectState>
</component>
<component name="ExternalProjectsManager" storeExternally="true" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="450">
<file leaf-file-name="DiamondPrinterTest.kt" pinned="false" current-in-tab="false">
@ -33,7 +34,7 @@
<entry file="file://$PROJECT_DIR$/src/main/kotlin/DiamondPrinter.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="13" column="41" lean-forward="true" selection-start-line="13" selection-start-column="41" selection-end-line="13" selection-end-column="41" />
<caret line="13" column="41" lean-forward="false" selection-start-line="13" selection-start-column="41" selection-end-line="13" selection-end-column="41" />
<folding />
</state>
</provider>
@ -359,8 +360,8 @@
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$USER_HOME$/emerald-randomizer/code/EmeraldRandomizer" />
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../flatten-array" />
<property name="settings.editor.selected.configurable" value="reference.settingsdialog.project.gradle" />
<property name="aspect.path.notification.shown" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="run.code.analysis.last.selected.profile" value="pProject Default" />
@ -485,7 +486,7 @@
</recent_temporary>
</component>
<component name="SbtLocalSettings">
<option name="lastUpdateTimestamp" value="1500868273966" />
<option name="lastUpdateTimestamp" value="1501015222520" />
<option name="externalProjectsViewState">
<projects_view />
</option>
@ -502,7 +503,7 @@
<updated>1500868261705</updated>
<workItem from="1500868263266" duration="684000" />
<workItem from="1500869075625" duration="115000" />
<workItem from="1500947742119" duration="2219000" />
<workItem from="1500947742119" duration="3230000" />
</task>
<servers />
</component>
@ -539,7 +540,7 @@
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="3018000" />
<option name="totallyTimeSpent" value="4029000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="2552" height="1390" extended-state="0" />
@ -552,7 +553,7 @@
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3292683" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3292683" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3292683" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
@ -677,7 +678,7 @@
<entry file="file://$PROJECT_DIR$/src/main/kotlin/DiamondPrinter.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="13" column="41" lean-forward="true" selection-start-line="13" selection-start-column="41" selection-end-line="13" selection-end-column="41" />
<caret line="13" column="41" lean-forward="false" selection-start-line="13" selection-start-column="41" selection-end-line="13" selection-end-column="41" />
<folding />
</state>
</provider>

View file

@ -1,13 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="diamond" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/out" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
<module external.linked.project.id="diamond" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4" />

View file

@ -0,0 +1,2 @@
#Tue Jul 25 16:44:18 EDT 2017
gradle.version=4.0.1

9
kotlin/flatten-array/.idea/compiler.xml generated Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="flatten-array_main" target="1.8" />
<module name="flatten-array_test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

19
kotlin/flatten-array/.idea/gradle.xml generated Normal file
View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="/usr/share/java/gradle" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
<option name="useAutoImport" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>

6
kotlin/flatten-array/.idea/kotlinc.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JvmCompilerArguments">
<option name="jvmTarget" value="1.8" />
</component>
</project>

View file

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: junit:junit:4.12">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.hamcrest:hamcrest-core:1.3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b/hamcrest-core-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.jetbrains:annotations:13.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/5991ca87ef1fb5544943d9abc5a9a37583fabe03/annotations-13.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.1/98e484e67f913e934559f7f55f0c94be5593f03c/kotlin-stdlib-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.1/a287944d92875a1f3c2161e5cddaede7720913d1/kotlin-stdlib-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-test:1.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test/1.1.1/5a852a554eb4f9fb93efdffa352b7983ed595e32/kotlin-test-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test/1.1.1/4b9a869f86569edea4a07d19b9749ac835fb7207/kotlin-test-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-test-junit:1.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test-junit/1.1.1/a1865f59b6f72597452e5bdfefeb14d13bc31c7d/kotlin-test-junit-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-test-junit/1.1.1/ed59de63c4565c708124caaa4e86562a780f9ba0/kotlin-test-junit-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

6
kotlin/flatten-array/.idea/misc.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>

10
kotlin/flatten-array/.idea/modules.xml generated Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/flatten-array.iml" filepath="$PROJECT_DIR$/flatten-array.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/flatten-array_main.iml" filepath="$PROJECT_DIR$/.idea/modules/flatten-array_main.iml" group="flatten-array" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/flatten-array_test.iml" filepath="$PROJECT_DIR$/.idea/modules/flatten-array_test.iml" group="flatten-array" />
</modules>
</component>
</project>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="flatten-array:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.6" useProjectSettings="false">
<compilerSettings />
<compilerArguments>
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="flatten-array_main" />
<option name="jvmTarget" value="1.6" />
<option name="addCompilerBuiltIns" value="true" />
<option name="loadBuiltInsFromDependencies" value="true" />
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
<option name="pluginOptions">
<array />
</option>
<option name="pluginClasspaths">
<array />
</option>
</compilerArguments>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/../../out/production/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/main">
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/kotlin" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
</component>
</module>

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="flatten-array:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.6" useProjectSettings="false">
<compilerSettings />
<compilerArguments>
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="flatten-array_main" />
<option name="jvmTarget" value="1.6" />
<option name="addCompilerBuiltIns" value="true" />
<option name="loadBuiltInsFromDependencies" value="true" />
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
<option name="pluginOptions">
<array />
</option>
<option name="pluginClasspaths">
<array />
</option>
</compilerArguments>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output-test url="file://$MODULE_DIR$/../../out/test/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/test">
<sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/kotlin" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="flatten-array_main" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-test-junit:1.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-test:1.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.1" level="project" />
<orderEntry type="library" name="Gradle: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
</component>
<component name="TestModuleProperties" production-module="flatten-array_main" />
</module>

855
kotlin/flatten-array/.idea/workspace.xml generated Normal file
View file

@ -0,0 +1,855 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="d251fdfc-4fb1-43c8-98da-06ecdbc36d98" name="Default" comment="" />
<ignored path="$PROJECT_DIR$/.gradle/" />
<ignored path="$PROJECT_DIR$/build/" />
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
</projectState>
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="FlattenerTest.kt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/kotlin/FlattenerTest.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="15" column="25" lean-forward="true" selection-start-line="15" selection-start-column="25" selection-end-line="15" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Flattener.kt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/kotlin/Flattener.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Kotlin Class" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>@Ignore\n</find>
</findStrings>
</component>
<component name="GradleLocalSettings">
<option name="myGradleHomes">
<map>
<entry key="$PROJECT_DIR$" value="/usr/share/java/gradle" />
</map>
</option>
<option name="myGradleVersions">
<map>
<entry key="$PROJECT_DIR$" value="4.0.1" />
</map>
</option>
<option name="availableProjects">
<map>
<entry>
<key>
<ExternalProjectPojo>
<option name="name" value="flatten-array" />
<option name="path" value="$PROJECT_DIR$" />
</ExternalProjectPojo>
</key>
<value>
<list>
<ExternalProjectPojo>
<option name="name" value="flatten-array" />
<option name="path" value="$PROJECT_DIR$" />
</ExternalProjectPojo>
</list>
</value>
</entry>
</map>
</option>
<option name="availableTasks">
<map>
<entry key="$PROJECT_DIR$">
<value>
<list>
<ExternalTaskPojo>
<option name="description" value="Displays the components produced by root project 'flatten-array'. [incubating]" />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="components" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Assembles and tests this project and all projects that depend on it." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="buildDependents" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays the sub-projects of root project 'flatten-array'." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="projects" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Assembles main classes." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="classes" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays the dependent components of components in root project 'flatten-array'. [incubating]" />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="dependentComponents" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays all buildscript dependencies declared in root project 'flatten-array'." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="buildEnvironment" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Generates Gradle wrapper files." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="wrapper" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Assembles test classes." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="testClasses" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Generates Javadoc API documentation for the main source code." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="javadoc" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Assembles a jar archive containing the main classes." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="jar" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays the configuration model of root project 'flatten-array'. [incubating]" />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="model" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="copyMainKotlinClasses" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Processes main resources." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="processResources" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays the tasks runnable from root project 'flatten-array'." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="tasks" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Initializes a new Gradle build." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="init" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="copyTestKotlinClasses" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Runs the unit tests." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="test" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Compiles main Java source." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="compileJava" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Compiles the source set 'test'.kotlin." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="compileTestKotlin" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays the insight into a specific dependency in root project 'flatten-array'." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="dependencyInsight" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Runs all checks." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="check" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Assembles the outputs of this project." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="assemble" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Deletes the build directory." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="clean" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Compiles test Java source." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="compileTestJava" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays all dependencies declared in root project 'flatten-array'." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="dependencies" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Processes test resources." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="processTestResources" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays a help message." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="help" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Compiles the source set 'main'.kotlin." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="compileKotlin" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Assembles and tests this project." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="build" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Assembles and tests this project and all projects it depends on." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="buildNeeded" />
</ExternalTaskPojo>
<ExternalTaskPojo>
<option name="description" value="Displays the properties of root project 'flatten-array'." />
<option name="linkedExternalProjectPath" value="$PROJECT_DIR$" />
<option name="name" value="properties" />
</ExternalTaskPojo>
</list>
</value>
</entry>
</map>
</option>
<option name="modificationStamps">
<map>
<entry key="$PROJECT_DIR$" value="1501015032000" />
</map>
</option>
<option name="projectBuildClasspath">
<map>
<entry key="$PROJECT_DIR$">
<value>
<ExternalProjectBuildClasspathPojo>
<option name="modulesBuildClasspath">
<map>
<entry key="$PROJECT_DIR$">
<value>
<ExternalModuleBuildClasspathPojo>
<option name="entries">
<list>
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin/1.1.1/e742de8adf25f631b39f74e2d6fd00cd9cdd609e/kotlin-gradle-plugin-1.1.1-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin/1.1.1/5e3d99580c70b67a07cd70481943362e4b29d8d3/kotlin-gradle-plugin-1.1.1.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.4/f2d8698c46d1167ff24b06a840a87d91a02db891/commons-io-2.4-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.4/b1b6ea3b7e4aa4f492509a4952029cd8e48019ad/commons-io-2.4.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.6/67313d715fbf0ea4fd0bdb69217fb77f807a8ce5/commons-lang-2.6-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.6/ce1edb914c94ebc388f086c6827e8bdeec71ac2/commons-lang-2.6.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.1/a287944d92875a1f3c2161e5cddaede7720913d1/kotlin-stdlib-1.1.1-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.1/98e484e67f913e934559f7f55f0c94be5593f03c/kotlin-stdlib-1.1.1.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-android-extensions/1.1.1/2c0ad82587d187f78c4063fa7867ed3c4dfa54ca/kotlin-android-extensions-1.1.1-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-android-extensions/1.1.1/56cfcc61bc91638ea52d13ce90b565f50be3d6f5/kotlin-android-extensions-1.1.1.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-api/1.1.1/e48aafb092d4c3ddd6927f38f9f17f7117e1ef47/kotlin-gradle-plugin-api-1.1.1-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-api/1.1.1/9083de2c98801f1fe058b6280234265269c1cad0/kotlin-gradle-plugin-api-1.1.1.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.1.1/b84662e33f8f44d33265e964f1329ce5644af35c/kotlin-compiler-embeddable-1.1.1-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.1.1/d975091bb224a04b3717505a55875608642cc8d3/kotlin-compiler-embeddable-1.1.1.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-runner/1.1.1/764b45d92a761810b29580aeae2fac3d614f9bf/kotlin-compiler-runner-1.1.1-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-runner/1.1.1/cad5c437ac58f7245673a6c4fd73a656dd259b26/kotlin-compiler-runner-1.1.1.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-annotation-processing/1.1.1/2756d002e8d1d1aa0d5a49e7c895b87514083fab/kotlin-annotation-processing-1.1.1-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-annotation-processing/1.1.1/9f7312cea58b39ce82368261cd227758df78eb32/kotlin-annotation-processing-1.1.1.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/5991ca87ef1fb5544943d9abc5a9a37583fabe03/annotations-13.0-sources.jar" />
<option value="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar" />
</list>
</option>
<option name="path" value="$PROJECT_DIR$" />
</ExternalModuleBuildClasspathPojo>
</value>
</entry>
</map>
</option>
<option name="name" value="flatten-array" />
<option name="projectBuildClasspath">
<list>
<option value="/usr/share/java/gradle/lib/ant-launcher-1.9.6.jar" />
<option value="/usr/share/java/gradle/lib/gradle-script-kotlin-tooling-builders-0.9.0.jar" />
<option value="/usr/share/java/gradle/lib/gradle-base-services-groovy-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-tooling-api-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-logging-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-native-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-script-kotlin-0.9.0.jar" />
<option value="/usr/share/java/gradle/lib/gradle-launcher-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-model-groovy-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/groovy-all-2.4.11.jar" />
<option value="/usr/share/java/gradle/lib/gradle-runtime-api-info-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-resources-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-core-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-process-services-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-cli-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/ant-1.9.6.jar" />
<option value="/usr/share/java/gradle/lib/gradle-model-core-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-docs-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-messaging-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-installation-beacon-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-jvm-services-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-wrapper-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-script-kotlin-compiler-plugin-0.9.0.jar" />
<option value="/usr/share/java/gradle/lib/gradle-base-services-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/gradle-script-kotlin-tooling-models-0.9.0.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-diagnostics-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-code-quality-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-language-scala-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-signing-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-plugins-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-publish-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-build-cache-http-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-platform-play-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-ivy-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-language-java-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-language-groovy-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-build-init-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/ivy-2.2.0.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-plugin-use-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-language-native-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-scala-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-reporting-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-tooling-api-builders-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-ide-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-test-kit-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-plugin-development-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-ide-play-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-platform-native-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-javascript-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-build-comparison-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-jacoco-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-antlr-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-ide-native-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-ear-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-resources-sftp-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-resources-http-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-osgi-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-announce-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-maven-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-language-jvm-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-testing-native-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-testing-base-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-platform-jvm-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-testing-jvm-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-platform-base-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-workers-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-resources-s3-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-composite-builds-4.0.1.jar" />
<option value="/usr/share/java/gradle/lib/plugins/gradle-dependency-management-4.0.1.jar" />
<option value="$PROJECT_DIR$/buildSrc/src/main/java" />
<option value="$PROJECT_DIR$/buildSrc/src/main/groovy" />
</list>
</option>
</ExternalProjectBuildClasspathPojo>
</value>
</entry>
</map>
</option>
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/test/kotlin/FlattenerTest.kt" />
<option value="$PROJECT_DIR$/src/main/kotlin/Flattener.kt" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="width" value="2544" />
<option name="height" value="1390" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="AndroidView" />
<pane id="Scope" />
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="flatten-array" type="b2602c69:ProjectViewProjectNode" />
<item name="flatten-array" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="flatten-array" type="b2602c69:ProjectViewProjectNode" />
<item name="flatten-array" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="flatten-array" type="b2602c69:ProjectViewProjectNode" />
<item name="flatten-array" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="flatten-array" type="b2602c69:ProjectViewProjectNode" />
<item name="flatten-array" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="kotlin" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="flatten-array" type="b2602c69:ProjectViewProjectNode" />
<item name="flatten-array" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="flatten-array" type="b2602c69:ProjectViewProjectNode" />
<item name="flatten-array" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="kotlin" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="settings.editor.selected.configurable" value="project.kotlinCompiler" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="JUnit.FlattenerTest">
<configuration name="FlattenerTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="flatten-array_test" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="FlattenerTest" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
</configuration>
<configuration name="FlattenerTest.flattens2LevelNestedList" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="flatten-array_test" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="FlattenerTest" />
<option name="METHOD_NAME" value="flattens2LevelNestedList" />
<option name="TEST_OBJECT" value="method" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<module />
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
</configuration>
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
<option name="PROGRAM_PARAMETERS" />
<predefined_log_file id="idea.log" enabled="true" />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
</configuration>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="JUnit.FlattenerTest" />
<item index="1" class="java.lang.String" itemvalue="JUnit.FlattenerTest.flattens2LevelNestedList" />
</list>
<recent_temporary>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="JUnit.FlattenerTest" />
<item index="1" class="java.lang.String" itemvalue="JUnit.FlattenerTest.flattens2LevelNestedList" />
</list>
</recent_temporary>
</component>
<component name="SbtLocalSettings">
<option name="lastUpdateTimestamp" value="1501015460056" />
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="d251fdfc-4fb1-43c8-98da-06ecdbc36d98" name="Default" comment="" />
<created>1501015451954</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1501015451954</updated>
<workItem from="1501015455717" duration="2058000" />
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="FlattenerTest - 2017.07.25 at 17h 18m 30s.xml">
<configuration name="FlattenerTest" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 12m 17s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 13m 12s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 13m 27s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 13m 47s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 13m 57s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 14m 03s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 14m 52s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 18m 14s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
<history-entry file="FlattenerTest_flattens2LevelNestedList - 2017.07.25 at 17h 18m 26s.xml">
<configuration name="FlattenerTest.flattens2LevelNestedList" configurationId="JUnit" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2058000" />
</component>
<component name="ToolWindowManager">
<frame x="-1" y="0" width="2562" height="1391" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32981315" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="SBT" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32981315" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32981315" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="sbt-shell-toolwindow" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39967507" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="5" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar!/org/junit/internal/runners/model/ReflectiveCallable.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/kotlin/FlattenerTest.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="15" column="25" lean-forward="true" selection-start-line="15" selection-start-column="25" selection-end-line="15" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/kotlin/Flattener.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>Kotlin</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>flatten-array_main|flatten-array</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.6" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<last-edited>Gradle: org.jetbrains:annotations:13.0</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View file

@ -0,0 +1,21 @@
# Flatten Array
Take a nested list and return a single flattened list with all values except nil/null.
The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
For Example
input: [1,[2,3,null,4],[null],5]
output: [1,2,3,4,5]
## Source
Interview Question [https://reference.wolfram.com/language/ref/Flatten.html](https://reference.wolfram.com/language/ref/Flatten.html)
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

View file

@ -0,0 +1,28 @@
buildscript {
ext.kotlin_version = '1.1.1'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testCompile 'junit:junit:4.12'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}
test {
testLogging {
exceptionFormat = 'full'
events = ["passed", "failed", "skipped"]
}
}

View file

@ -0,0 +1 @@
11001

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="flatten-array" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/out" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -0,0 +1,14 @@
class Flattener {
companion object {
fun flatten(inpList: List<Any?>): List<Any?> {
val returnList: MutableList<Any?> = mutableListOf()
for (i in inpList){
if (i is List<*>){
returnList.addAll(flatten(i))
}
else returnList.add(i)
}
return returnList.filter { it != null }
}
}
}

View file

@ -0,0 +1,50 @@
import org.junit.Test
import org.junit.Ignore
import kotlin.test.assertEquals
class FlattenerTest {
@Test
fun flattensANestedList() {
val nestedList = listOf<Any>(emptyList<Any>())
assertEquals(emptyList<Any>(), Flattener.flatten(nestedList))
}
@Test
fun flattens2LevelNestedList() {
val nestedList = listOf(1, listOf(2, 3, 4), 5)
assertEquals(listOf(1, 2, 3, 4, 5), Flattener.flatten(nestedList))
}
@Test
fun flattens3LevelNestedList() {
val nestedList = listOf(1, listOf(2, 3, 4), 5, listOf(6, listOf(7, 8)))
assertEquals(listOf(1, 2, 3, 4, 5, 6, 7, 8), Flattener.flatten(nestedList))
}
@Test
fun flattens5LevelNestedList() {
val nestedList = listOf(0, 2, listOf(listOf(2, 3), 8, 100, 4, listOf(listOf(listOf(50))), -2))
assertEquals(listOf(0, 2, 2, 3, 8, 100, 4, 50, -2), Flattener.flatten(nestedList))
}
@Test
fun flattens6LevelNestedList() {
val nestedList = listOf(1, listOf(2, listOf(listOf(3)), listOf(4, listOf(listOf(5))), 6, 7), 8)
assertEquals(listOf(1, 2, 3, 4, 5, 6, 7, 8), Flattener.flatten(nestedList))
}
@Test
fun flattens6LevelNestedListWithNulls() {
val nestedList = listOf(1, listOf(2, null, listOf(listOf(3), null), listOf(4, listOf(listOf(5))), 6, 7, listOf(listOf(null))), 8, null)
assertEquals(listOf(1, 2, 3, 4, 5, 6, 7, 8), Flattener.flatten(nestedList))
}
@Test
fun allNullNestedListReturnsEmptyList() {
val nestedList = listOf(null, listOf(null, listOf(null), listOf(listOf(listOf(null)))), null)
assertEquals(emptyList<Any>(), Flattener.flatten(nestedList))
}
}