diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9afcbff
--- /dev/null
+++ b/.gitignore
@@ -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/
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index fdc392f..39e70b4 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -16,5 +16,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 8ec9e56..ee60c75 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -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 {
diff --git a/src/main/kotlin/Day1.kt b/src/main/kotlin/Day1.kt
deleted file mode 100644
index f1eafa9..0000000
--- a/src/main/kotlin/Day1.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-fun main() {
-
-}
\ No newline at end of file
diff --git a/src/main/kotlin/day1/Day1.kt b/src/main/kotlin/day1/Day1.kt
new file mode 100644
index 0000000..f15ad66
--- /dev/null
+++ b/src/main/kotlin/day1/Day1.kt
@@ -0,0 +1,12 @@
+package day1
+
+import java.nio.file.Files
+import java.nio.file.Path
+
+class Day1 {
+ fun loadFile(inputFile: Path): List {
+ return Files.readAllLines(inputFile)
+ }
+
+
+}
diff --git a/src/main/resources/day1.txt b/src/main/resources/day1.txt
new file mode 100644
index 0000000..326092a
--- /dev/null
+++ b/src/main/resources/day1.txt
@@ -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