The previous implementation of nth was incorrect, it returned the nth
element of the optree but it did not modify the internal state of the
iterator such that future calls to `next()` were after the nth element.
This commit fixes that.
Signed-off-by: Alex Good <alex@memoryandthought.me>
file.
Added the `AMchangeHashes` struct.
Added the `AMchange` and `AMchanges` structs.
Tied the lifetime of an `AMobjId` struct to the `AMresult` struct that
it's returned through so that it can be used to reach equivalent objects
within multiple `AMdoc` structs.
Removed the `AMfreeObjId()` function.
Renamed `AMallocDoc()` to `AMalloc()`.
Added the `AMcommit()` function.
Added the `AMgetChangeHash()` function.
Added the `AMgetChanges()` function.
Added the `AMgetMessage()` function.
Added the `AMlistDelete()` function.
Added the `AMlistPutBool()` function.
Added the `AMmapDelete()` function.
Added the `AMmapPutBool()` function.
Added the `AMobjSizeAt()` function.
Added the `AMsave()` function.
Renamed the `AMvalue::Nothing` variant to `AMvalue::Void`.
Changed all `AMobjId` struct function arguments to be immutable.
Tied the lifetime of an `AMobjId` struct to the `AMresult` struct that
it's returned through so that it can be used to reach equivalent objects
within multiple `AMdoc` structs.
Added test cases for the `AMlistPutBool()` function.
Added a test case for the `AMmapPutBool()` function.
file.
Added the `AMchangeHashes` struct.
Added the `AMchange` and `AMchanges` structs.
Added `ChangeHashes` and `Changes` variants to the `AMresult` struct.
Renamed the `AMvalue::Nothing` variant to `AMvalue::Void`.
Tied the lifetime of an `AMobjId` struct to the `AMresult` struct that
it's returned through so that it can be used to reach equivalent objects
within multiple `AMdoc` structs.
Consolidated the `AMresult` struct's related trait implementations.