mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
371f9554b8
The primary use-case for this was to be able to run computations on a list of structures, then return an updated list with some fields in the structures modified : that is what we need for distribution of tax amounts among household members, for example. This patch has a few components: - Addition of a test as an example for tax distributions - Added a transformation, performed during desugaring, that -- where lists are syntactically expected, i.e. after the `among` keyword -- turns a (syntactic) tuple of lists into a list of tuples ("zipping" the lists) - Arg-extremum transformation was also fixed to use an intermediate list instead of computing the predicate twice - For convenience, allow to bind multiple variables in most* list operations (previously only `let in` and functions allowed it) - Fixed the printer for tuples to differentiate them from lists *Note: tuples are not yet allowed on the left-hand side of filters and arg-extremums for annoying syntax conflict reasons. |
||
---|---|---|
.. | ||
bad | ||
good |