diff options
-rw-r--r-- | 2022/main.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/2022/main.nim b/2022/main.nim index 9960bf9..15ba6b9 100644 --- a/2022/main.nim +++ b/2022/main.nim @@ -1,12 +1,16 @@ # Day ???: ??? -import std/[os, strutils, sequtils, sugar, enumerate] +import std/[os, strutils, sequtils, sugar] # import std/[algorithm, math, hashes, tables, sets] -# import std/[strformat, strscans] +# import std/[strformat, strscans, enumerate] # useful functions and things to remember: # - readFile, splitLines, split(""), strip({''}) # - map(func), filter(func), all(func), any(func) # - foldl(func, init), string.repeat(count), zip(a, b) # for i, chr in "string": assert "string"[i] == chr +# assert @[0, 1, 2, 3] == collect(for i in 0..3: i) -let input: string = paramStr(1).readFile() +let input = paramStr(1).readFile().strip().split("\n") + +for line in input: + discard |