-
Notifications
You must be signed in to change notification settings - Fork 323
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
Some tweaks following Steve's testings #10042
Conversation
f19cb5b
to
83bc2f1
Compare
@@ -214,7 +217,7 @@ type Date_Range | |||
(Date.new 2021 05 07).up_to (Date.new 2021 05 10) . to_vector | |||
to_vector : Vector Date | |||
to_vector self = | |||
proxy = Array_Proxy.new self.length self.at | |||
proxy = Array_Proxy.new self.length (self.at _) |
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.
What does this change do? Naively, I thought self.at
== x-> self.at x
== self.at _
.
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.
Once the index argument of at
got a default, calling self.at
will force all default arguments and thus will return the first element, not the lambda. The equation above holds if there are no default arguments.
Btw.
proxy = Array_Proxy.new self.length (self.at _) | |
proxy = Array_Proxy.new self.length (self.at ...) |
would probably work as well
Pull Request Description
at
andget
.at
andget
picking the first item.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.