|
|
|
|
|
by markslicker
2443 days ago
|
|
It is quite common in SML/ML code I've encountered, probably not as common in modern OCaml. BTW, in OCaml let add ((a:int), (b:int)) : int = a + b
Works just fine, whereas: let add ((a:int), (b:int)) -> int = a + b
is nonsense, because '->' is a type constructer in OCaml (a function from types to types) not part of an ad-hoc syntax for function declarations (like Rust). |
|