2016-05-23 29 views
0

我試圖寫整數列表與下面的代碼字節的文件:OCaml中寫入int列表,以一個字節的文件

let out_channel = open_out_bin "G:\\JVM\\OcamlTest2.class";; 

let writeBytes out_channel finalBytes = 
match finalBytes with 
| [] -> close_out out_channel 
| hd::tl -> output_byte out_channel hd; writeBytes out_channel tl;; 

而且我得到以下錯誤:

錯誤:未綁定值writeBytes

我該如何解決這個問題?

+1

你應該更新你的標題,因爲問題不是你想做什麼,而是一些語法錯誤。 – Lhooq

回答