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

Array, ReadonlyArray: change scanLeft & scanRight to return NonEmpty #1391

Merged
merged 1 commit into from Feb 3, 2021

Conversation

willheslam
Copy link
Contributor

@willheslam willheslam commented Feb 2, 2021

Given scanLeft/Right, unlike reduce, always returns an array that has at least one element (the seed),
it makes sense to me to be more specific about the result.

What do you think? Are there any unintended consequences I'm missing here?

@gcanti
Copy link
Owner

gcanti commented Feb 2, 2021

it makes sense to me to be more specific about the result

Thanks @willheslam, I agree.

src/ReadonlyArray.ts Outdated Show resolved Hide resolved
src/ReadonlyArray.ts Outdated Show resolved Hide resolved
@gcanti gcanti merged commit d875100 into gcanti:master Feb 3, 2021
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

2 participants