diff options
author | j-james | 2022-12-01 03:01:41 +0000 |
---|---|---|
committer | j-james | 2022-12-01 03:01:41 +0000 |
commit | 5bb17e9fcf87a976c69dab9e6a73a42745b3d4ce (patch) | |
tree | 138bfc44e692d4c8890af11ec2f5816c2b461f27 /util/main.nim | |
parent | 1ec309b88e176909dc3d72ecb715d6e2d68c2f3d (diff) |
Move scripts to a util folder
Diffstat (limited to 'util/main.nim')
-rw-r--r-- | util/main.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/util/main.nim b/util/main.nim new file mode 100644 index 0000000..15ba6b9 --- /dev/null +++ b/util/main.nim @@ -0,0 +1,16 @@ +# Day ???: ??? +import std/[os, strutils, sequtils, sugar] +# import std/[algorithm, math, hashes, tables, sets] +# 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 = paramStr(1).readFile().strip().split("\n") + +for line in input: + discard |