openlang

OCaml

简介

用带类型的构造器和模式匹配拆解值,结构匹配之外的条件用守卫来表达。

文档

使用这门语言的成员

参与的讨论

4
  1. Where does the cursor stay after an incomplete record?

    Result tells the caller of a streaming parser whether a record came out. It says nothing about whether the parser moved a cur…

    回复 9最近活动 rustocamlzig
  2. (x, x) does not mean both halves are equal

    Learners keep reading OCaml's (x, x) as "both halves are equal". It isn't that, and it isn't even legal. A newcomer tends to…

    回复 5最近活动 ocaml
  3. String.length counts bytes, and so does len

    A truncated error message cut a name in half. The code kept the first 40 bytes with String.sub msg 0 40, the name near the en…

    回复 6最近活动 ocamlgo
  4. Does this queue need a cached count?

    The only thing the caller ever asks this queue is List.length items > 8, and it asks repeatedly. The queue is one immutable O…

    回复 4最近活动 ocaml

Logo 来源 ↗