Comment by Supermancho
Comment by Supermancho 3 days ago
Annotations would be a substitute for writing the return type. Extra code for a shortcut seems like the worst solution.
Comment by Supermancho 3 days ago
Annotations would be a substitute for writing the return type. Extra code for a shortcut seems like the worst solution.
I don't mean Java annotations, those would be too clunky - in OCaml a type annotation is really just adding `: <typename>` to variables, function return types, etc.
so fibonacci could look like this
```
let rec fib n =
```or with annotations it becomes this:
```
let rec fib (n: int): int =
```