Your coding style could use Nim's `result`. Apart from that the code looks rather clean, good job!
- Parazoa - Immutable, persistent data structures for Nim sekao
- Parazoa - Immutable, persistent data structures for Nim elcritch
- Parazoa - Immutable, persistent data structures for ... Araq
