Skip to content

Commit 6bd0d8e

Browse files
authored
doc(context-fun): fix context-function literal
1 parent 7fcaa84 commit 6bd0d8e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/docs/reference/contextual/context-functions.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,17 @@ For example, continuing with the previous definitions,
4343

4444
g(f(2)) // is expanded to g((using ev: ExecutionContext) => f(2)(using ev))
4545

46-
g((using ctx: ExecutionContext) => f(22)(using ctx)) // is left as it is
46+
g(ExecutionContext ?=> f(22)) // is left as it is
4747
```
48+
49+
<!--
50+
51+
TODO the previous proposed syntax does not compile:
52+
g((using ctx: ExecutionContext) => f(22)(using ctx)) // is left as it is
53+
results in `not a legal formal parameter`
54+
55+
-->
56+
4857
### Example: Builder Pattern
4958

5059
Context function types have considerable expressive power. For

0 commit comments

Comments
 (0)