-
Notifications
You must be signed in to change notification settings - Fork 4
review: Add TODOs to pure/List (ignore for merging) #195
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
base: main
Are you sure you want to change the base?
Conversation
✨ Documentation preview for 7798a18:
|
See #189. Containing some corrections. And more tests. |
@@ -584,6 +597,7 @@ module { | |||
/// Space: O(n) | |||
/// | |||
/// *Runtime and space assumes that `f` runs in O(1) time and space. | |||
// TODO: now: make TR - was TR in base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in #189
@@ -616,6 +630,7 @@ module { | |||
/// Runtime: O(n) | |||
/// | |||
/// Space: O(n) | |||
// TODO: now: make TR - was TR in base (see replicate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in #189
@@ -797,6 +817,7 @@ module { | |||
/// Runtime: O(size) | |||
/// | |||
/// Space: O(size) | |||
// TODO: make TR was TR in base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only see toIter
in legacy base
, maybe named differently?
Found it: Iter.toList
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fixed in #189
@@ -797,6 +817,7 @@ module { | |||
/// Runtime: O(size) | |||
/// | |||
/// Space: O(size) | |||
// TODO: make TR was TR in base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO: make TR was TR in base | |
// TODO: now: make TR - was TR in base |
@@ -302,11 +309,13 @@ module { | |||
/// Runtime: O(size(l)) | |||
/// | |||
/// Space: O(size(l)) | |||
// TODO: now make TR - append was TR in base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO: now make TR - append was TR in base | |
// TODO: now: make TR - `append` was TR in base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fixed in #189 too
public func concat<T>(list1 : List<T>, list2 : List<T>) : List<T> = switch list1 { | ||
case null list2; | ||
case (?(h, t)) ?(h, concat(t, list2)) | ||
}; | ||
|
||
// TODO: documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in #189
@@ -530,6 +541,7 @@ module { | |||
/// Space: O(1) | |||
/// | |||
/// *Runtime and space assumes that `equalFunc` runs in O(1) time and space. | |||
// TODO: rename equalFunc equalItem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in #189
@@ -554,6 +566,7 @@ module { | |||
/// Space: O(1) | |||
/// | |||
/// *Runtime and space assumes that argument `compare` runs in O(1) time and space. | |||
// TODO: rename compare compareItem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in #189
@@ -8,6 +8,8 @@ | |||
/// import List "mo:base/List"; | |||
/// ``` | |||
|
|||
// TODO: future: all examples are meant to be self-contained actors, don't include common code either. | |||
// TODO: future: many switches test for incommon null case first - reorder for perf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I was doing this reordering on the fly
@@ -254,6 +259,7 @@ module { | |||
/// Space: O(size) | |||
/// | |||
/// *Runtime and space assumes that `f` runs in O(1) time and space. | |||
// TODO: now: make TR - was TR in base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is also fixed in #189 (with test added)
I took pass through pure List and added immediate and future TODOs.
The immediate ones are regressions vs base and I think should be fixed ASAP.
Others, marked future are for us to revisit at leisure (existing flaws we can fix later)