To summarise, given that _indexing_ of strings is for the bytes, it could be easier to treat strings as a sequence of bytes.
`toSeq(foo.items)` did the trick. However, `foo.items.toSeq` did _not_ work. I think that's odd. But all I really need are examples. I definitely appreciate that Nim handles Unicode so well via the `runes()` iterator, and that it stores in bytes. That's all very sensible. Someone asked why I want to use Python idioms. That's easy: I see Nim as the single best choice to replace the pattern of Python + extension modules. People use Python because it's easy, with a huge standard library, and they use extension modules when they need speed. And they might integrate with C or C++ executables. I need a single language so I can simplify installation and integration. It must be statically typed because people tend to use such gigantic test-cases (against my admonitions) that typos are seen too late. And it needs to be terse, because researchers do a lot of experimental prototyping; there is never a "spec". (**R** is very popular.) I think **Nim** is easy and concise enough to replace Python for researchers (yes, in biosciences) who would never have time to learn something like **Ocaml**. **Julia** is a bit too limiting. I think **Rust** is too verbose (and the borrow-checker too finicky) for these users. **Go** is a fair alternative, but I really think these folks are better off with exceptions and generics. I guess **Java** is possible too, but it's so verbose. **Scala** could be ok if it didn't take eons to compile. **C#** could suffice, but it's not portable. Languages like **Swift** _allow_ static typing but do not require it, and they might be slow for numerics. So I've decided to try **Nim**. In order to bring colleagues into this world, I need to be able to say, "Where you did _this_ in Python, you can do _this_ in Nim." I'll have to build up a small library of helpers.
