由於我是Ocaml的新成員,並且我沒有找到資源,所以我需要您的幫助來解決這個問題功能!我想通過將int轉換爲char來生成一個數字列表。在'a'中變換0,在'b'中變爲1,在'c'中變換2等等...在OCaml中
module Util =
sig
(* transform 0 in ’a’, 1 in ’b’, 2 in ’c’ etc... *)
val int_to_char : int -> char
(*gen_random_list long max *)
(* generate a list of positive numbers <= max *)
(* the length of the list is long *)
val gen_random_list : int -> int -> int list
end
你說你沒有找到資源,但你甚至嘗試過ocaml.org嗎?如果是這樣,是缺乏的東西? –