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

examples that use "lines.max" for "longest line" are wrong #28

Open
timo opened this issue Oct 28, 2017 · 0 comments
Open

examples that use "lines.max" for "longest line" are wrong #28

timo opened this issue Oct 28, 2017 · 0 comments

Comments

@timo
Copy link
Collaborator

timo commented Oct 28, 2017

the max of a list of lines is the lexicographically last, for example if there's a single line in the file that starts with a z, it's quite likely to be the "max" even though it could be just one letter long.

instead, you want to use .max(*.chars), which will compare the number of characters of all lines to find the longest line.

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

No branches or pull requests

1 participant