A lot of times I need to make simple anonymous functions to function like array_filter, array_foreach and etc. But sometimes what I want to do is very simple, but I have to use 3 whole lines to do it, like in this example:
I'm not asking to make the same thing, but something like that would be cool(it won't change anything of how the code works, but I think it's easier to use)
Describe alternatives you've considered
We could use something like the lambdas of python, but I think it's a little bit too different of how gamemaker code is usually written, but I think it's worth mentioning
The arrow function notation is what YYG considers along with having lambdas as closures (so that local variables from the outside are accessible within the function). See #3296 for more details.
Is your feature request related to a problem?
A lot of times I need to make simple anonymous functions to function like array_filter, array_foreach and etc. But sometimes what I want to do is very simple, but I have to use 3 whole lines to do it, like in this example:
Describe the solution you'd like
I think we could add another way of doing it(keeping the current way of doing it), like the arrow functions of javascript
I'm not asking to make the same thing, but something like that would be cool(it won't change anything of how the code works, but I think it's easier to use)
Describe alternatives you've considered
We could use something like the lambdas of python, but I think it's a little bit too different of how gamemaker code is usually written, but I think it's worth mentioning
Additional context
I saw it when I was learning about GMEdit and I thought it was cool![image](https://github.com/YoYoGames/GameMaker-Bugs/assets/121255466/f3893176-f304-42b8-a9ab-d5839b9994ab)