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

Formalize lambdas #311

Open
annevk opened this issue Jun 8, 2020 · 3 comments
Open

Formalize lambdas #311

annevk opened this issue Jun 8, 2020 · 3 comments

Comments

@annevk
Copy link
Member

annevk commented Jun 8, 2020

In whatwg/html#5560 (comment) @inexorabletash suggests formalizing lambdas, e.g.:

Let steps be to fire an event x at y.

@inexorabletash
Copy link
Member

Example from Indexed DB, text suggested by @domenic

Let operation be an algorithm to run store a record into an object store with store, clone, key, and no-overwrite flag.

@inexorabletash
Copy link
Member

Streams uses e.g.

Let pullAlgorithm be an algorithm that returns a promise resolved with undefined.

and:

...set cancelAlgorithm to an algorithm which takes an argument reason and returns the result of invoking underlyingSourceDict["cancel"] with argument list « reason » and callback this value underlyingSource.

@jyasskin
Copy link
Member

Is this a duplicate of #206?

In any case, this and #206 should be defined in the same section, and the definition should say what happens if they refer to variables from the surrounding scope. (I think we usually assume they capture references so that people can make closures.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants