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 consV, snocV for building NonEmptyVector #8

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

AlistairB
Copy link
Contributor

@AlistairB AlistairB commented Nov 18, 2020

from an A and a Vector.

Also, cons and snoc can be defined in terms of consV and snocV now.

Closes #7

An alternative way to think about (and name) these would be as construction functions ie. mkNonEmptyVector :: a -> Vector a -> NonEmptyVector a. I suppose once you consV you then have a NonEmptyVector, so you wouldn't chain multiple consV.

from an A and a Vector.

Also, cons and snoc can be defined in terms of consV and snocV now
Copy link
Owner

@emilypi emilypi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for doing the docs too. I'll merge on green and do a minor point release. To your point: i kind of like consV and snocV as a descriptor as opposed to the wordier version.

@emilypi emilypi merged commit b323fb6 into emilypi:master Nov 18, 2020
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.

A way to build from an A and a Vector
2 participants