Skip to content

Make nothing :: Maybe a, remove extra parameter#502

Merged
KtorZ merged 1 commit into
MostlyAdequate:masterfrom
eush77:nothing
May 24, 2019
Merged

Make nothing :: Maybe a, remove extra parameter#502
KtorZ merged 1 commit into
MostlyAdequate:masterfrom
eush77:nothing

Conversation

@eush77

@eush77 eush77 commented Feb 18, 2019

Copy link
Copy Markdown
Contributor

nothing is only used in one place, and as a function it was called incorrectly before: nothing() instead of nothing(undefined). (See #500 (comment).)

This PR fixes that by removing the extra layer of function wrapping entirely, and making nothing a constant of type Maybe a. This is to avoid the more verbose alternative — adding the undefined argument.

`nothing` is only used in one place, and as a function it was called
incorrectly before: `nothing()` instead of `nothing(undefined)`.

This commit fixes that by removing the extra layer of function wrapping
entirely, and making `nothing` a constant of type `Maybe a`. This is to
avoid the more verbose alternative - adding the `undefined` argument.
@KtorZ KtorZ merged commit c0870eb into MostlyAdequate:master May 24, 2019
@KtorZ

KtorZ commented May 24, 2019

Copy link
Copy Markdown
Member

Good idea!

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.

2 participants