type Company = <company>[ Worker* ];;
type Worker  = <worker>[Surname Name Salary];;
type Surname = <surname>[PCDATA];;
type Name = <name>String;;
type Salary = <salary>[Int];;
type PlusQueMoi = <salary>[5000--*];;

let my_company : Company =
<company>[
  <worker>[
    <surname>"Durand"
    <name>"Paul"
    <salary>[6500]
  ]
  <worker>[
    <surname>"Dupond"
    <name>"Jean"
    <salary>[1800]
  ]
  <worker>[
    <surname>"Martin"
    <name>"Jules"
    <salary>[1800]
  ]
] in 


let _ = 
  let <company> x = my_company in
  map x with <worker>[x y _ ] -> <worker>[x y] in


let q2 = 
 let <company>[(x::<worker>[ _ _ <salary>[ 1800 ] ] | _)*] = my_company in
 map x with <worker>[x y _ ] -> <worker>[x y] in
  
q2;;


