Skip to content

Add carry/borrow to Fallible<MutableDataInt.Body> #148

@oscbyspro

Description

@oscbyspro

The MutableDataInt<Element>.Body model has many operation pairs similar to this:

extension MutableDataInt.Body {
    consuming func increment(..............) -> Fallible<Self>
    consuming func incrementSubSequence(...) -> Fallible<Self>
}

The *SubSequence operations represent some core algorithm that stops at the end of the given arguments. The non-*SubSequence carries or borrows the error indicator after that point. What if I instead add a carry() and borrow() to Fallible<MutableDataInt.Body>? I believe those two methods would make every non-*SubSequence variant obsolete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    additionoh, so shiny!brrrsuch code, much wowmaybeto do, or not to do?subtractionhuh? where did it go?

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions