這是一個簡單的ocaml文件,目的是讓我瞭解如何將使用電池庫的程序加載到ocamltop中。 batteryassault.ml open Batteries
let main = print_string "hello, world ... powered on"
我編譯這與 ocamlfind ocamlc -package batteries -linkpkg batteryassa
我想使用module List of Ocaml Batteries的功能。我已經安裝了電池,並寫出如下代碼: open Extlib
...
Extlib.ExtList.List.remove ...
在編譯時,它給了我一個錯誤Error: Unbound module Extlib。有誰知道會發生什麼?
let find arr word =
let rec binaryserach arr word min max =
let mid = (min + max)/2 in
if max < min then -1 else
if (String.compare arr.(mid) word = 0) then mid else
if (Strin
極力打造的OCaml的WebSocket,它失敗: File "lib/websocket.ml", line 202, characters 29-42:
Error: The function applied to this argument has type
?buffer_size:int ->
(Lwt_io.input_channel * Lwt_io.out