Added arrow
This commit is contained in:
parent
a024000b15
commit
4662564aa8
6 changed files with 237 additions and 3 deletions
100
.gitignore
vendored
Normal file
100
.gitignore
vendored
Normal file
|
@ -0,0 +1,100 @@
|
|||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### Kotlin template
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
.gitignore
|
||||
.gradle/
|
15
.idea/jarRepositories.xml
generated
15
.idea/jarRepositories.xml
generated
|
@ -16,5 +16,20 @@
|
|||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://dl.bintray.com/arrow-kt/arrow-kt/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +1,7 @@
|
|||
plugins {
|
||||
kotlin("jvm") version "1.3.61"
|
||||
application
|
||||
kotlin("kapt") version "1.3.61"
|
||||
}
|
||||
|
||||
group = "dev.acicchetti"
|
||||
|
@ -8,10 +9,19 @@ version = "1.0-SNAPSHOT"
|
|||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url = uri("https://dl.bintray.com/arrow-kt/arrow-kt/")
|
||||
}
|
||||
}
|
||||
|
||||
val arrowVersion = "0.10.3"
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
implementation("io.arrow-kt:arrow-core:$arrowVersion")
|
||||
implementation("io.arrow-kt:arrow-syntax:$arrowVersion")
|
||||
implementation("io.arrow-kt:arrow-optics:$arrowVersion")
|
||||
kapt("io.arrow-kt:arrow-meta:$arrowVersion")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
fun main() {
|
||||
|
||||
}
|
12
src/main/kotlin/day1/Day1.kt
Normal file
12
src/main/kotlin/day1/Day1.kt
Normal file
|
@ -0,0 +1,12 @@
|
|||
package day1
|
||||
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
|
||||
class Day1 {
|
||||
fun loadFile(inputFile: Path): List<String> {
|
||||
return Files.readAllLines(inputFile)
|
||||
}
|
||||
|
||||
|
||||
}
|
100
src/main/resources/day1.txt
Normal file
100
src/main/resources/day1.txt
Normal file
|
@ -0,0 +1,100 @@
|
|||
76663
|
||||
111378
|
||||
132647
|
||||
115688
|
||||
67473
|
||||
85562
|
||||
62955
|
||||
64052
|
||||
104961
|
||||
128687
|
||||
60344
|
||||
81158
|
||||
129984
|
||||
106462
|
||||
55967
|
||||
130004
|
||||
140810
|
||||
71523
|
||||
64891
|
||||
142922
|
||||
122783
|
||||
123918
|
||||
116246
|
||||
120842
|
||||
105578
|
||||
122950
|
||||
107512
|
||||
70051
|
||||
55347
|
||||
54348
|
||||
89301
|
||||
95258
|
||||
122323
|
||||
136781
|
||||
137756
|
||||
95658
|
||||
91017
|
||||
79626
|
||||
98414
|
||||
79296
|
||||
75226
|
||||
143850
|
||||
131334
|
||||
107028
|
||||
76591
|
||||
75492
|
||||
66400
|
||||
51904
|
||||
79262
|
||||
68956
|
||||
98957
|
||||
52481
|
||||
87955
|
||||
118871
|
||||
148734
|
||||
103699
|
||||
68681
|
||||
55118
|
||||
144120
|
||||
59403
|
||||
115012
|
||||
147742
|
||||
124218
|
||||
73580
|
||||
114949
|
||||
65346
|
||||
113104
|
||||
129059
|
||||
119068
|
||||
72339
|
||||
74984
|
||||
53095
|
||||
127452
|
||||
133786
|
||||
111439
|
||||
98153
|
||||
96312
|
||||
139641
|
||||
88907
|
||||
136831
|
||||
73574
|
||||
67871
|
||||
57641
|
||||
134505
|
||||
72116
|
||||
134503
|
||||
134387
|
||||
88598
|
||||
78687
|
||||
61020
|
||||
107234
|
||||
64801
|
||||
132668
|
||||
60204
|
||||
90001
|
||||
87833
|
||||
131148
|
||||
61488
|
||||
107938
|
||||
116072
|
Loading…
Add table
Reference in a new issue