You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here the method `convertCtoF` is passed to forecastInFahrenheit This is possible because the compiler coerces `convertCtoF` to the function `x => convertCtoF(x)` (note: `x` will
61
+
Here the method `convertCtoF` is passed to `forecastInFahrenheit`. This is possible because the compiler coerces `convertCtoF` to the function `x => convertCtoF(x)` (note: `x` will
64
62
be a generated name which is guaranteed to be unique within its scope).
65
63
66
64
## Functions that accept functions
@@ -81,8 +79,6 @@ object SalaryRaiser {
81
79
}
82
80
```
83
81
84
-
Execution yields the output:
85
-
86
82
Notice how each of the three methods vary only by the multiplication factor. To simplify,
87
83
you can extract the repeated code into a higher-order function like so:
0 commit comments