Day 03 part 1
var answer: Natural
proc score(chars: HashSet[char]): Natural =
for c in chars:
if c.ord >= 'a'.ord and c.ord <= 'z'.ord: result.inc c.ord - 'a'.ord + 1
elif c.ord >= 'A'.ord and c.ord <= 'Z'.ord: result.inc c.ord - 38
for l in "input.txt".lines:
answer.inc score(
toHashSet(l[0..<l.len div 2]) *
toHashSet(l[l.len div 2..<l.len])
)
Answer is: 7737