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

Change the time complexity of head from O(n) to O(1) #35

Merged
merged 1 commit into from Dec 4, 2019

Conversation

sjakobi
Copy link
Contributor

@sjakobi sjakobi commented Dec 3, 2019

This example seems to indicate that it's not necessary to build the full list:

> Data.DList.head (pure 1 <> undefined)
1

@sjakobi
Copy link
Contributor Author

sjakobi commented Dec 3, 2019

I hope this is not a terrible misunderstanding of mine! ;)

This example seems to indicate that it's not necessary to build
the full list:

    > Data.DList.head (pure 1 <> undefined)
    1
@sjakobi sjakobi changed the title Change the time complexity from O(n) to O(1) Change the time complexity of head from O(n) to O(1) Dec 3, 2019
@spl
Copy link
Owner

spl commented Dec 4, 2019

That looks right to me. Thanks!

@spl spl merged commit 793933c into spl:master Dec 4, 2019
@sjakobi sjakobi deleted the head-complexity branch February 8, 2020 15:40
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

2 participants