File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
docs/docs/reference/contextual Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,13 @@ with implicit function types as parameters to avoid the plumbing boilerplate
8383that would otherwise be necessary.
8484``` scala
8585 def table (init : (given Table ) => Unit ) = {
86- given t as Table
86+ given t : Table
8787 init
8888 t
8989 }
9090
9191 def row (init : (given Row ) => Unit )(given t : Table ) = {
92- given r as Row
92+ given r : Row
9393 init
9494 t.add(r)
9595 }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ A special form of import wildcard selector is used to import given instances. Ex
77``` scala
88object A {
99 class TC
10- given tc as TC
10+ given tc : TC
1111 def f (given TC ) = ???
1212}
1313object B {
@@ -50,8 +50,8 @@ Importing all given instances of a parameterized type is expressed by wildcard a
5050For instance, assuming the object
5151``` scala
5252object Instances {
53- given intOrd as Ordering [Int ]
54- given [T as Ordering ] listOrd as Ordering [List [T ]]
53+ given intOrd : Ordering [Int ]
54+ given [T : Ordering ] listOrd : Ordering [List [T ]]
5555 given ec : ExecutionContext = ...
5656 given im : Monoid [Int ]
5757}
You can’t perform that action at this time.
0 commit comments