Skip to content

use triple-quoted strings to avoid backslashes #16

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

Merged
merged 1 commit into from
Nov 6, 2014

Conversation

davidchambers
Copy link
Contributor

This is a readability improvement in my opinion.

"""
function _charAt(i, s, Just, Nothing) {
if (i < 0 || i >= s.length) return Nothing;
else return Just(s.charAt(i));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this?

return i >= 0 && i < s.length ? Just(s.charAt(i)) : Nothing;

Seems a tad cleaner to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree. Sorry, I literally just merged as your message popped up. If you want to send another PR, I'll merge it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No worries. Thanks for the quick merge!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#17

paf31 added a commit that referenced this pull request Nov 6, 2014
use triple-quoted strings to avoid backslashes
@paf31 paf31 merged commit 1152224 into purescript:master Nov 6, 2014
@paf31
Copy link
Contributor

paf31 commented Nov 6, 2014

Thanks!

@davidchambers davidchambers deleted the triple-quotes branch November 6, 2014 04:17
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