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

Implicit arguments for anonymous functions #103

Closed
brollb opened this issue Nov 11, 2019 · 2 comments
Closed

Implicit arguments for anonymous functions #103

brollb opened this issue Nov 11, 2019 · 2 comments

Comments

@brollb
Copy link
Contributor

brollb commented Nov 11, 2019

Anonymous functions in NetsBlox/Snap! have implicit arguments when none are specified as shown below. The generated code should reflect these same rules.

When arguments are specified (even if unused), empty slots are evaluated to "0":
DeepinScreenshot_select-area_20191111153304

If no arguments are specified and it is called with a single value, all empty slots will be filled with the given value.
DeepinScreenshot_select-area_20191111153201

If the number of inputs passed matches the number of empty slots, then the inputs are passed to each empty slot.
DeepinScreenshot_select-area_20191111153218

@brollb
Copy link
Contributor Author

brollb commented Nov 11, 2019

This is higher priority since it is a common practice (especially with the map block)

@brollb
Copy link
Contributor Author

brollb commented Nov 11, 2019

However, I don't think the last case is very common so I am moving that to #105

@brollb brollb closed this as completed in 57347ee Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant