Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在学习Jason Hickey 的 Objective Caml 简介。
我有几个简单的问题:
是什么binding?
binding
是什么occurrences?
occurrences
是什么binding occurrences?
binding occurrences
我问这些问题是因为这本书说:
我没有读过这篇文章,只是一个谦虚的实践者(不是理论家),但我很确定我知道这些术语的含义。
绑定是名称与值的关联。
出现是名称在表达式中的一次出现。如果名称出现两次,则出现两次。
绑定事件是名称在某个位置的出现,导致它绑定到一个值。在let x = 4 in x + 2第一次出现中x是绑定出现,第二次只是出现。
let x = 4 in x + 2
x
编辑:引用的文本告诉您的是,当名称出现在模式中时,模式的成功匹配会导致名称绑定到一个值。