4 Matching Annotations
  1. Nov 2022
    1. This project file is needed in the root directory of every source tree that you want to compile with Dune. In general, you’ll have a dune file in every subdirectory of the source tree but only one dune-project file at the root.

      dune 文件用来制定每个 sub-directory 如何编译;而dune-project 文件用来指定整个项目的编译配置

    1. let increment x = x + 1

      Ocaml 中函数定义的语法和变量定义的语法基本一致,这让 “函数也是一种数据” 变得更加显然。

    1. There are five essential components to learning a language: syntax, semantics, idioms, libraries, and tools.

      掌握语言的五个要点:语法规则、语义表示、习语定式、库、工具

    1. Parametric polymorphism: Functions and data structures can be parameterized over types. This is crucial for being able to re-use code.

      参数化多态,也就是,范型