aboutsummaryrefslogtreecommitdiff
path: root/util/main.nim
blob: 15ba6b9004b6b654e3146d26ba0dd621f8c38018 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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