bevy_dev_console icon indicating copy to clipboard operation
bevy_dev_console copied to clipboard

Add Functions/Closures

Open doonv opened this issue 2 years ago • 0 comments

What problem does this solve or what need does it fill?

There is no way to make your own functions/closures inside the built-in parser.

What solution would you like?

Add a way to create your own functions/closures.

I think only implementing closures is actually the right move, mostly because its less work. But I also kinda prefer the closure syntax for creating functions in a console. Heres an example:

my_func = |a| a + 5
my_func 5
> 10

doonv avatar Jan 11 '24 13:01 doonv