The type is inferenced, not things itself.
This commit is contained in:
parent
4025970742
commit
812c9416fc
|
|
@ -13,8 +13,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Here, `things` is *inferenced* to be `&str` because that's the value we push
|
Here, the type of `things` is *inferenced* to be `&str` because that's the value
|
||||||
into `things`.
|
we push into `things`.
|
||||||
|
|
||||||
The type inference is based on the standard Hindley-Milner (HM) type inference
|
The type inference is based on the standard Hindley-Milner (HM) type inference
|
||||||
algorithm, but extended in various way to accommodate subtyping, region
|
algorithm, but extended in various way to accommodate subtyping, region
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue