blob: 97f5511a0f543f936ac5cd0b2bdf54b342f1a200 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
* Advent of Code 2019
** Personal challenge
Try to keep the solution pure. Only main can do IO things, like return
different results when it's called differently. The rest of the
program should only be pure expressions.
** Optimizations
- Limit the use of statements. Try to use expressions instead, or move
the statement out to a function.
** Findings
- Having iterators that you can't clone (like stdin) makes certain
things difficult. Eg, doing part 1 and 2 together.
- Using "new type" structs can be a pain. derive_more crate made most
of that pain go away.
|