Skip to content
New issue

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

NotEmptySet type inheritance #9

Closed
4 tasks done
LVMVRQUXL opened this issue Dec 27, 2022 · 1 comment
Closed
4 tasks done

NotEmptySet type inheritance #9

LVMVRQUXL opened this issue Dec 27, 2022 · 1 comment
Assignees
Labels
common Item related to all platforms. feature New feature or request.
Milestone

Comments

@LVMVRQUXL
Copy link
Contributor

LVMVRQUXL commented Dec 27, 2022

Description

Update the implementation of the NotEmptySet type for not inheriting from a type like the following:

data class NotEmptySet<A>(val head: A, val tail: NotEmptySet<A>? = null) {
    val asSet: Set<A> get() = TODO()
    val size: StrictlyPositiveInt get() = TODO()
}

Checklist

  • Implement.
  • Test.
  • Refactor.
  • Update Work in progress section in changelog.
@LVMVRQUXL LVMVRQUXL added feature New feature or request. common Item related to all platforms. labels Dec 27, 2022
@LVMVRQUXL LVMVRQUXL added this to the 4.0.0 milestone Dec 27, 2022
@LVMVRQUXL LVMVRQUXL self-assigned this Dec 27, 2022
@LVMVRQUXL
Copy link
Contributor Author

The tail parameter should be optional:

data class NotEmptySet<E>(val head: E, val tail: Set<E>? = null)

LVMVRQUXL added a commit that referenced this issue Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Item related to all platforms. feature New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant