Skip to content

Commit 0d7f02b

Browse files
committed
Update tour
1 parent 29fe680 commit 0d7f02b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/tour/captures.effekt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ For the same reason, we must not return a function that closes over such a capab
3838

3939
To prevent capabilities from escaping their scope, Effekt tracks captures.
4040
In the case of the previous example, the return type of the handler is `Exception at {exc}`.
41-
This is called a boxed computation. A boxed computation may only be used after unboxing it, which is only permitted when all its captures are in scope. In fact, the example above does not typecheck, since the type `Exception at {exc}` would not be well-formed outside of the handler that introduces (and binds!) the capability `exc`.
41+
This is called a boxed computation. A boxed computation may only be used after unboxing it, which happens automatically and is only permitted when all its captures are in scope. In fact, the example above does not typecheck, since the type `Exception at {exc}` would not be well-formed outside of the handler that introduces (and binds!) the capability `exc`.
4242

4343
## Boxing
4444

@@ -83,7 +83,7 @@ Thus, we need to enforce that both `f` and `g` are pure, that is, do not capture
8383
```
8484
def parallel (f: () => Unit at {}, g: () => Unit at {}): Unit = <>
8585
```
86-
The type-checker will reject calls, where we try to pass functions that to close over capabilities (or builtin resources):
86+
The type-checker will reject calls, where we try to pass functions that close over capabilities (or builtin resources):
8787
```effekt:repl
8888
parallel(
8989
box { () => println("Hello, ") },

0 commit comments

Comments
 (0)