| ▲ | siwatanejo 9 days ago | ||||||||||||||||
IMO OCaml is mind-bending (e.g. go figure out the 'in' keyword, I still don't understand it), F# is much easier/simpler. | |||||||||||||||||
| ▲ | spider-mario 9 days ago | parent | next [-] | ||||||||||||||||
`let <var> = <expr> in <expr>` is an expression. Top-level bindings are just `let <var> = <expr>`. That’s pretty much all there is to it.
https://ideone.com/HpTrI4 | |||||||||||||||||
| ▲ | tuvix 9 days ago | parent | prev | next [-] | ||||||||||||||||
Never used OCaml but it seems like a way to chain together expressions using the same variable name? Seems odd but I could see myself using it | |||||||||||||||||
| ▲ | shikck200 9 days ago | parent | prev | next [-] | ||||||||||||||||
Ocaml is just an ML in the traditional sense. It keep scope without curlies. There is really not much else to it. | |||||||||||||||||
| ▲ | debugnik 9 days ago | parent | prev [-] | ||||||||||||||||
The 'in' keyword is purely syntax, like semicolons/newlines or braces in your language of choice. | |||||||||||||||||
| |||||||||||||||||