-
Notifications
You must be signed in to change notification settings - Fork 8
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
Prototype methods that accept a callback #18
Comments
This wouldn't work in the current formulation, as it is limited to
functions (as opposed to methods). Do you think this use case is important
enough that you think we should care?
WRT parameters, this is the current formulation:
https://github.com/samuelgoto/proposal-block-params#bindings
Which granted would be a bit awkward in this case.
…On Thu, Nov 9, 2017 at 11:17 AM, Rick Waldron ***@***.***> wrote:
I didn't see any examples of this, so I'm curious:
let numbers = [1, 2, 3];let mapped = numbers.map {
// ...
}
Does this work?
How would I get the value, index, object args?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#18>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAqV6oo14hFVRgTeSzCRSiRMVH0v1cYGks5s00-9gaJpZM4QYgLs>
.
--
f u cn rd ths u cn b a gd prgmr !
|
Hopefully any suggestions that include special properties of a |
To be clear, this is as close as it would get in the current formulation (without any assumptions made on the let numbers = [1, 2, 3];
let mapped = map(numbers) do (value, index) {
// ...
console.log(`${value} ${index}`);
} Does that sound reasonable? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I didn't see any examples of this, so I'm curious:
Does this work?
How would I get the value, index, object args?
The text was updated successfully, but these errors were encountered: