Skip to content

Add consV, snocV for building NonEmptyVector#8

Merged
emilypi merged 1 commit intoemilypi:masterfrom
AlistairB:cons-snoc-v
Nov 18, 2020
Merged

Add consV, snocV for building NonEmptyVector#8
emilypi merged 1 commit intoemilypi:masterfrom
AlistairB:cons-snoc-v

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