We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is currently no way of ensuring that a .continuation(...) does not succeed an .absence.
.continuation(...)
.absence
Perhaps a good way to deal with this is similar to the Path.Builder.
Path.Builder
extension Rhythm.Leaf.Kind { struct Collection { } } protocol AllowingStart { func start(_ attack: Element) -> AllowingStart & AllowingContinuation & AllowingAbsence func start(_ attack: Element, _ release: Element) -> AllowingStart & AllowingAbsence } protocol AllowingContinuation { func continuation(_ sustain: Element) -> AllowingStart & AllowingContinuation & AllowingAbsence // if a release element is provided, don't allow continuation func continuation(_ sustain: Element, _ release: Element) -> AllowingStart & AllowingAbsence } protocol AllowingAbsence { // don't allow continuation after rest func absence() -> AllowingStart & AllowingAbsence } extension Rhythm.Leaf.Kind.Collection { final class Builder { var storage: [Leaf.Kind] = [] } } extension Rhythm.Leaf.Kind.Collection.Builder: AllowingStart, AllowingContinuation, AllowingAbsence { ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is currently no way of ensuring that a
.continuation(...)
does not succeed an.absence
.Perhaps a good way to deal with this is similar to the
Path.Builder
.The text was updated successfully, but these errors were encountered: