Copyright | (c) Eric Mertens 2019 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2019/day/12
The stepping function is invertible, so any cycles must include the starting point. This means to find a cycle we just search for the starting point rather than remembering all states along the way.