| 40 |
sort base;; |
sort base;; |
| 41 |
|
|
| 42 |
|
|
|
|
|
| 43 |
let fun contact(Person->String) |
let fun contact(Person->String) |
| 44 |
| <person>[ _ _ ((<tel kind="work"> x) | (<email> x) | (<tel kind="home"> x))] -> x |
| <person>[ _ _ ((<tel kind="work"> x) | (<email> x) | (<tel> x))] -> x |
| 45 |
| _ ->"no contact";; |
| _ ->"no contact";; |
| 46 |
|
|
| 47 |
|
|
| 48 |
|
contact( |
| 49 |
|
<person gender="F">[ |
| 50 |
|
<name>"Véronique" |
| 51 |
|
<children>[ |
| 52 |
|
<person gender="F">[ |
| 53 |
|
<name>"Ilaria" |
| 54 |
|
<children>[] |
| 55 |
|
] |
| 56 |
|
] |
| 57 |
|
<tel> "314-1592654" |
| 58 |
|
]) |
| 59 |
|
;; |
| 60 |
|
|
| 61 |
|
contact base;; |
| 62 |
|
|
| 63 |
(* compilation efficace avec _ a la place de person *) |
(* compilation efficace avec _ a la place de person *) |
| 64 |
|
|