File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -253,10 +253,13 @@ accept given parameters and
253
253
[ polymorphic functions] ({{ site.scala3ref }}/new-types/polymorphic-function-types.html)
254
254
have type parameters.
255
255
256
- Most code uses methods most of the time,
257
- unless a function value is actually needed. With
258
- [ eta-expansion] ( https://stackoverflow.com/questions/39445018/what-is-the-eta-expansion-in-scala ) ,
259
- a method can be converted as a function when needed.
256
+ It's standard to use methods most of the time,
257
+ except when function value is actually needed.
258
+ [ Eta-expansion] ( https://stackoverflow.com/questions/39445018/what-is-the-eta-expansion-in-scala ) ,
259
+ converts methods to functions when needed.
260
+ For example, a method such as ` map ` expects a function,
261
+ but even if you ` def square ` as shown above, you can
262
+ still ` xs.map(square) ` .
260
263
261
264
### What's the difference between types and classes?
262
265
You can’t perform that action at this time.
0 commit comments