catala/tests/test_func/good/func.catala
Denis Merigoux 3c8d187be0
Big refactoring of the literate programming structure
Partially fixes #120
Removes the distinction between headers and articles, streamlines the surface AST
Changes affects lexers and parser
2021-05-15 01:16:08 +02:00

23 lines
352 B
Markdown

## Article
```catala
new scope S:
param f content int fun of int
param b content bool
param out content int
new scope R:
param s scope S
param r content int
scope S:
def f of x [| (x >= x) |] := x + x
def f of x [| not b |] := x * x
def b := false
def out := f of 5
scope R:
def s.f of x := x + x * x
def r := s.out
```catala