aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.kt
diff options
context:
space:
mode:
authortchojnacki <tomaszchojnacki2001@gmail.com>2021-12-06 09:46:00 +0100
committertchojnacki <tomaszchojnacki2001@gmail.com>2021-12-06 09:46:00 +0100
commit4db920b62c8d9f611d18d4c5402c1957ba9f162d (patch)
treeb8e48d66ae9bb408b3dc05e70858e4057ca8644b /src/Utils.kt
parent8f84c868b8d65b714447155b301acc6db4e992b2 (diff)
downloadgleam_aoc2020-4db920b62c8d9f611d18d4c5402c1957ba9f162d.tar.gz
gleam_aoc2020-4db920b62c8d9f611d18d4c5402c1957ba9f162d.zip
Refactoring
Diffstat (limited to 'src/Utils.kt')
-rw-r--r--src/Utils.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Utils.kt b/src/Utils.kt
index 6268ba6..7876c3a 100644
--- a/src/Utils.kt
+++ b/src/Utils.kt
@@ -21,7 +21,7 @@ fun readInputAsString(name: String): String = File("src", "$name.txt").readText(
* @param name name of the file
* @return list of ints containing numbers from each of file's lines
*/
-fun readInputAsNumbers(name: String): List<Int> = readInputAsLines(name).map { it.toInt() }
+fun readInputAsNumbers(name: String): List<Int> = readInputAsLines(name).map(String::toInt)
/**
* Read lines from the given input txt file containing binary numbers and convert them to lists of bits.