以下で説明するモジュールの目的は、整数nによって開始されると、nの値に基づいてすべての操作を実行するモジュールを実装することです。
module ReturnSetZero =
functor ( Elt : int ) ->
struct
let rec sublist b e l =
match l with
[] -> failwith "sublist"
| h :: t ->
let tail = if e = 0 then [] else sublist (b - 1) (e - 1) t in
if b > 0 then tail else h :: tail
let rec zerol = 0:: zerol
let zeron = sublist 0 n zerol
(*other operations based on n which is selected once when the module is initialized*)
end;;
エラー:バインドされていないモジュールタイプint
ここでの問題は何ですか?より効果的/直感的な代替実装はありますか?