While working on adding more array methods, the limitations of the temporary function dispatch logic I had were preventing these new functions to actually be useable, because the correct function was not being selected when multiple had the same name in some situations.
This PR improves on this a lot (but not perfectly; it's only matching one statement at a time, so it may fail if it needs to cross multiple statement boundaries. I need to do a lot of reworking to resolve that), getting the closures_by_name test to actually work, rather than me cheating by reordering the function definitions, and implementing filter, reduce, and more array functions.
While working on adding more array methods, the limitations of the temporary function dispatch logic I had were preventing these new functions to actually be useable, because the correct function was not being selected when multiple had the same name in some situations.
This PR improves on this a lot (but not perfectly; it's only matching one statement at a time, so it may fail if it needs to cross multiple statement boundaries. I need to do a lot of reworking to resolve that), getting the
closures_by_name
test to actually work, rather than me cheating by reordering the function definitions, and implementingfilter
,reduce
, and more array functions.