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

Fix docstrings of List.append and List.concat #854

Merged
merged 1 commit into from
Mar 24, 2018

Conversation

murmour
Copy link
Contributor

@murmour murmour commented Mar 23, 2018

Self-descriptive.

@gasche
Copy link
Member

gasche commented Mar 23, 2018

I thought that the complexity annotations where about time, not stack space (but then the one on concat/flatten seems to be stack space), and am unsure whether they should be removed or clarified/fixed.

@murmour
Copy link
Contributor Author

murmour commented Mar 23, 2018

I thought that the complexity annotations where about time, not stack space

I assumed that "O(...)" in "Tail-recursive O(length of the first argument)." is about space, because it is placed in the same sentence as "Tail-recursive", and because the non-tail-recursive version of append takes exactly as much stack space; but you're right that this also the time complexity! I'll add back the time complexity estimate with a better wording.

As for concat, the complexity comment is a leftover from the OCaml standard library.

Stack usage estimates are invalid.
@murmour
Copy link
Contributor Author

murmour commented Mar 24, 2018

I'll add back the time complexity estimate with a better wording.

Done.

@gasche gasche merged commit f32b4d8 into ocaml-batteries-team:master Mar 24, 2018
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