diff options
author | j-james | 2022-11-30 20:32:17 +0000 |
---|---|---|
committer | j-james | 2022-11-30 20:32:17 +0000 |
commit | f3be246c4e7d79df669fbf3c48710620d1c361d5 (patch) | |
tree | e6df4959cfcaabcfe0dd317f0431441aeb983aeb /2022 | |
parent | 568b7cde7290a8ae2d5cbcae6a2c6f4044b62214 (diff) |
Update Nim template
Diffstat (limited to '2022')
-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 |