Skip to content

Commit d8da6c3

Browse files
LPTKsmarter
andauthored
Update docs/docs/reference/new-types/polymorphic-function-types.md
Co-authored-by: Guillaume Martres <[email protected]>
1 parent 04b97e0 commit d8da6c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/new-types/polymorphic-function-types.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Here is how to implement this using polymorphic function types:
6060
```scala
6161
def mapSubexpressions[A](e: Expr[A])(f: [B] => Expr[B] => Expr[B]): Expr[A] =
6262
e match
63-
case Apply(fun, arg) => Apply(f(fun), f(arg))
64-
case Var(n) => Var(n)
63+
case Apply(fun, arg) => Apply(f(fun), f(arg))
64+
case Var(n) => Var(n)
6565
```
6666

6767
And here is how to use this function to _wrap_ each subexpression

0 commit comments

Comments
 (0)