File tree 2 files changed +5
-5
lines changed
docs/docs/reference/contextual
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
83
83
that would otherwise be necessary.
84
84
``` scala
85
85
def table (init : (given Table ) => Unit ) = {
86
- given t as Table
86
+ given t : Table
87
87
init
88
88
t
89
89
}
90
90
91
91
def row (init : (given Row ) => Unit )(given t : Table ) = {
92
- given r as Row
92
+ given r : Row
93
93
init
94
94
t.add(r)
95
95
}
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
7
7
``` scala
8
8
object A {
9
9
class TC
10
- given tc as TC
10
+ given tc : TC
11
11
def f (given TC ) = ???
12
12
}
13
13
object B {
@@ -50,8 +50,8 @@ Importing all given instances of a parameterized type is expressed by wildcard a
50
50
For instance, assuming the object
51
51
``` scala
52
52
object 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 ]]
55
55
given ec : ExecutionContext = ...
56
56
given im : Monoid [Int ]
57
57
}
You can’t perform that action at this time.
0 commit comments