Cheat-sheets fixes and improvements

This commit is contained in:
Louis Gesbert 2024-04-23 18:17:53 +02:00
parent 3e2aa54b81
commit fe2a562730
4 changed files with 19 additions and 21 deletions

View File

@ -65,9 +65,8 @@ declaration x content integer equals
round of $9.99
) in
let x equals (
get_day of 0,
get_month of 0,
get_year of 0
get_month of |2003-01-02|,
first_day_of_month of |2003-01-02|
) in
let x equals (
a +! b, # integer
@ -214,17 +213,17 @@ declaration x content integer equals
for all x among lst we have x > 2
in
let x equals
x + 2 for x among lst
(x + 2) for x among lst
in
let x equals
list of x among lst such that x > 2
in
let x equals
x - 2 for x among lst
(x - 2) for x among lst
such that x > 2
in
let x equals
x + y for (x, y) among (lst1, lst2)
(x + y) for (x, y) among (lst1, lst2)
in
let x equals
lst1 ++ lst2

View File

@ -378,8 +378,8 @@
\\
\begin{catala}
```catala
get_day of ... get_month of ...
get_year of ...
get_month of ...
first_day_of_month of ...
```
\end{catala}
& Date parts
@ -674,7 +674,7 @@
\\
\begin{catala}
```catala
x + 2 for x among lst
(x + 2) for x among lst
```
\end{catala}
& Mapping
@ -688,7 +688,7 @@
\\
\begin{catala}
```catala
x - 2 for x among lst
(x - 2) for x among lst
such that x > 2
```
\end{catala}
@ -696,7 +696,7 @@
\\
\begin{catala}
```catala
x + y for (x, y) among (lst1, lst2)
(x + y) for (x, y) among (lst1, lst2)
```
\end{catala}
& Multiple mapping

View File

@ -63,9 +63,8 @@ déclaration x contenu entier égal à
arrondi de 9,99€
) dans
soit x égal à (
accès_jour de 0 ,
accès_mois de 0 ,
accès_année de 0
accès_année de |2003-01-02|,
premier_jour_du_mois de |2003-01-02|
) dans
soit x égal à (
a +! b, # entier
@ -212,17 +211,17 @@ déclaration x contenu entier égal à
pour tout x parmi lst on a x >= 2
dans
soit x égal à
x + 2 pour x parmi lst
(x + 2) pour x parmi lst
dans
soit x égal à
liste de x parmi lst tel que x > 2
dans
soit x égal à
x - 2 pour x parmi lst
(x - 2) pour x parmi lst
tel que x > 2
dans
soit x égal à
x + y pour (x, y) parmi (lst1, lst2)
(x + y) pour (x, y) parmi (lst1, lst2)
dans
soit x égal à
lst1 ++ lst2

View File

@ -380,8 +380,8 @@
\\
\begin{catala}
```catala
accès_jour de ... accès_mois de ...
accès_année de ...
premier_jour_du_mois de ...
```
\end{catala}
& Éléments de dates
@ -679,7 +679,7 @@
\\
\begin{catala}
```catala
x + 2 pour x parmi lst
(x + 2) pour x parmi lst
```
\end{catala}
& Application un-à-un
@ -693,7 +693,7 @@
\\
\begin{catala}
```catala
x - 2 pour x parmi lst
(x - 2) pour x parmi lst
tel que x > 2
```
\end{catala}
@ -701,7 +701,7 @@
\\
\begin{catala}
```catala
x + y pour (x, y) parmi (lst1, lst2)
(x + y) pour (x, y) parmi (lst1, lst2)
```
\end{catala}
& Multiple mapping