catala/tests/test_array/aggregation.catala
2021-01-06 12:41:24 +01:00

23 lines
474 B
Plaintext

@Article@
/*
new scope A:
param x content set money
scope A:
def x := [$0; $4 +$ $5; $8 *$ 0.65]
new scope B:
param a scope A
param max content money
param min content money
param y content money
param z content int
scope B:
def max := maximum money init $0 for m in a.x of m *$ 2.0
def min := minimum money init $20 for m in a.x of m +$ $5
def y := sum money for m in a.x of (m +$ $1)
def z := number for m in a.x of (m >=$ $8.95)
*/