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

Use safe library function tailSafe instead of locally-defined tailOrEmpty. #676

Merged
merged 1 commit into from
Sep 4, 2019

Conversation

jonathanknowles
Copy link
Member

Issue Number

None. But spotted while looking at issue #674.

Overview

This replaces a hand-written function with a function from the safe library (which we already use elsewhere).

Copy link
Collaborator

@Anviking Anviking left a comment

Choose a reason for hiding this comment

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

Is it really worth using a library for the sake of replacing one trivial function though?

@jonathanknowles
Copy link
Member Author

jonathanknowles commented Sep 4, 2019

Is it really worth using a library for the sake of replacing one trivial function though?

We already use this library in other places in our code-base.

I'd argue it's better to use a commonly-used library than to keep on redefining these functions. The safe library is already pretty widely used. People are already familiar with functions like headMay, lastMay, tailSafe and so on.

@Anviking Anviking merged commit f4054d0 into master Sep 4, 2019
@jonathanknowles jonathanknowles deleted the jonathanknowles/use-safe-library branch September 4, 2019 09:23
@KtorZ KtorZ added this to the Recovery Week - Week 37 milestone Sep 13, 2019
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

3 participants