catala/tests/test_array/good/aggregation.catala_en

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
690 B
Plaintext
Raw Normal View History

## Article
```catala
declaration scope A:
output x content collection money
scope A:
definition x equals [$0; $4 +$ $5; $8 *$ 0.65]
declaration scope B:
a scope A
output max content money
output min content money
output y content money
output z content integer
scope B:
definition max equals maximum money initial $0 for m in a.x of m *$ 2.0
definition min equals minimum money initial $20 for m in a.x of m +$ $5
definition y equals sum money for m in a.x of (m +$ $1)
definition z equals number for m in a.x of (m >=$ $8.95)
```
```catala-test {id="A.Interpret"}
catala Interpret -s A
```
```catala-test {id="B.Interpret"}
catala Interpret -s B
```