I am trying to write F# parser. According to the specification the let expression looks like:
let value-defn in expr
I am using Try F# for testing. I tried following code which is parsed without error.
#light "off"
let a = 1
Yet according to the manual, should always contain in keyword. Why is it valid F# code?
In Scheme, you can use local variables pretty much the way you do in most languages. When you enter a let expression, the let variables will be bound and initialized with values. When you exit the let expression, those bindings will disappear.
As we know, a random variable is a rule or function that assigns a numerical value to each outcome of the experiment in a sample space. There are two types of random variables, i.e. discrete and continuous random variables.
A Scheme expression is a construct that returns a value, such as a variable reference, literal, procedure call, or conditional. Expression types are categorized as primitive or derived. Primitive expression types include variables and procedure calls.
This is actually covered by another part of the spec (A.2.1.1)
module-function-or-value-defn :
attributesopt let function-defn attributesopt let value-defn
Since you are defining something in a module directly, it doesn't need the in
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With