Try to further understanding the interface/module of OCaml

前端 未结 3 1791
眼角桃花
眼角桃花 2021-01-28 19:33

I understand in OCaml there are concepts of interfaces and module.

And I understand how to use them now.

However, what I don\'t under

3条回答
  •  情书的邮戳
    2021-01-28 20:21

    Since 3.12.1 OCaml allows this syntax for opening and aliasing modules:

    let foo .... =
      let module HashTable = HashMap in (* magic is here *)
      let h = HashTable.create () in
      ....
    

    So u just need to rename module what you are using where you are using it.

提交回复
热议问题