Hello MakeCode Community,
I am working on a project where I want to implement functionality similar to JavaScript’s Array.map
and Array.filter
methods using MakeCode blocks. I have some experience with MakeCode but am finding this challenge a bit complex. The main hurdle is incorporating a callback function within the block structure, particularly in returning values from the callback.
I tried mimicking the callback like an inline event handler, but I’m stuck on how to return values effectively. One idea was to have users update a variable for the new element value, but this seems unfeasible with local variables.
Has anyone in the community worked on similar extensions or functionalities? I’m looking for insights, examples, or any resources that could guide me in bringing these functional programming aspects into MakeCode.
Any help or pointers would be greatly appreciated as I am eager to learn and contribute more to this community.
Thank you!