Skip to content

Commit

Permalink
More example
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Sep 11, 2023
1 parent 1d2189c commit 35e295e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/ml.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,29 @@ let x = 42

---

## Strong type checking

* Improper

```
let x = 1 + 2
let x = 1 + 2.5
let x = 1 +. 2.5
let x = 1.0 + 2.5
```

* The only proper

```
let x = 1.0 +. 2.5
```

---

## Functions

* Fully type inference possible

```
let inc x = x + 1
```
Expand Down

0 comments on commit 35e295e

Please sign in to comment.