File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
# ` TypeFoldable ` and ` TypeFolder `
2
2
3
- In [ a previous chapter] , we discussed instantiating binders. This must involves looking at everything inside of a ` Early/Binder `
4
- to find any usages of the bound vars in order to replace them. Binders can wrap an arbitrary rust type ` T ` not just a ` Ty ` so
3
+ In [ a previous chapter] , we discussed instantiating binders. This involves looking at everything inside of a ` Early/Binder `
4
+ to find any usages of the bound vars in order to replace them. Binders can wrap an arbitrary Rust type ` T ` not just a ` Ty ` so
5
5
how do we implement the ` instantiate ` methods on the ` Early/Binder ` types.
6
6
7
7
The answer is a couple of traits:
@@ -20,7 +20,7 @@ that takes a type as input and returns a new type as a result. `TypeFoldable` in
20
20
` TypeFolder ` ` fold_foo ` methods on itself, giving the ` TypeFolder ` access to its contents (the
21
21
types, regions, etc that are contained within).
22
22
23
- You can think of it with this analogy to the iterator combinators we have come to love in rust :
23
+ You can think of it with this analogy to the iterator combinators we have come to love in Rust :
24
24
25
25
``` rust,ignore
26
26
vec.iter().map(|e1| foo(e2)).collect()
You can’t perform that action at this time.
0 commit comments