oczor icon indicating copy to clipboard operation
oczor copied to clipboard

Similarity between `module` and `let in / where`.

Open AnthonyJacob opened this issue 9 years ago • 1 comments

I think that it is possible to think of let in / where as an anonymous module, that is immediately exposed to local scope and vice versa.

Thus one of them can be replaced with the other.

AnthonyJacob avatar Nov 24 '16 10:11 AnthonyJacob

Yes

x = 
  foo = 1
  bar = 2

(foo = 1, bar = 2) is anonymous record but with in

x = 
  foo = 1
  bar = 2
  in
  foo + bar

this record is exposed to foo + bar expression.

ptol avatar Nov 24 '16 11:11 ptol