From 4db920b62c8d9f611d18d4c5402c1957ba9f162d Mon Sep 17 00:00:00 2001 From: tchojnacki Date: Mon, 6 Dec 2021 09:46:00 +0100 Subject: Refactoring --- src/Utils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Utils.kt') 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 = readInputAsLines(name).map { it.toInt() } +fun readInputAsNumbers(name: String): List = readInputAsLines(name).map(String::toInt) /** * Read lines from the given input txt file containing binary numbers and convert them to lists of bits. -- cgit v1.2.3