DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.56k stars 33 forks source link

`for` reduction implicit body can destructure, fix implicitly returned patterns in some cases #1613

Closed edemaine closed 3 days ago

edemaine commented 3 days ago

My initial goal was to make for sum [x] of y use an implicit body of x instead of [x].

Along the way, I ran into some bugs in patternAsValue, which led to cleaning up of some pattern matching code to correctly handle the previous addition of BindingElement.