私はいくつかのタイプを持っています:
type client = {nom : nom_client; demande : demande_client}
type itineraire = {num : num_itineraire;
capacite : capacite_itineraire;
liste_clients : client list}
type plan = Vide | Ilist of itineraire list
引数を指定するだけなので、クライアントと旅程を宣言できます。ただし、変数を型プランとして宣言する方法がわかりません。
type plan には旅程のリストしか含まれていませんが、次のことを行っています。
let myPlan = [(an itineraire here)];;
プランではなく旅程リストを返します。
では、旅程リストの Ilist の変数を宣言するにはどうすればよいでしょうか。