4 ms·
And for people who don't like writing so many 'in's, we also have 'and': let x = 1 and y = 2 and z = 3 in x * y * z Which indicates that the b
by yawaramin 2y ago
And for people who don't like writing so many 'in's, we also have 'and':
let x = 1
and y = 2
and z = 3 in
x * y * z
Which indicates that the binding of y can't refer to x and so on.
- steinuil 2y agoI've written a lot of OCaml and I always thought `let .. and .. in` indicated that the definitions were mutually recursive and that you could refer to y in x, like in `let rec .. and` or `type .. and`! That's surprising.
- yawaramin 2y agoI never thought about it much before but after seeing let+ and and+ 'debut' as operators for applicative functors (ie parallel application) it sort of clicked for me then.