Ad
  • Custom User Avatar

    I am an idiot.

    Thanks.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thanks! I originally wanted to do it all with the first iterator so that I didn't have to deal with the time of insert, but I quickly aborted out of that, since it probably would've been even messier. Shame that there's not a convenient way to define a state machine for iterators or something like that (or maybe there is in which case I'd really like to try it!).

    Edit: Well after writing that, I thought about using Iterator::scan and maybe trying generators on nightly, but given that scan has mutable references as part of its design and generators are still in nightly it seems like they are also not quite ideal solutions.

  • Custom User Avatar

    This is good. It's a shame that the iterator-based approach gets messy when you try to avoid the insertions of '-' and '.' at the end, though.