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

Add support for variadics for Option<T> #4

Merged
merged 6 commits into from
Apr 29, 2024
Merged

Add support for variadics for Option<T> #4

merged 6 commits into from
Apr 29, 2024

Conversation

lukadev-0
Copy link
Owner

This turns Option<T> into Option<T...>, which should be backwards compatible.

This also introduces the following methods:

  • unwrapOrNil: unwraps the value if it is some, otherwise returns nil.
  • mapOrRest: maps the value with the given function, or returns the rest of the arguments, like mapOr, but with variadic support.

@lukadev-0 lukadev-0 marked this pull request as ready for review April 29, 2024 18:53
@lukadev-0 lukadev-0 merged commit e47a7d3 into main Apr 29, 2024
1 check passed
@lukadev-0 lukadev-0 deleted the variadic-option branch April 29, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant