Commit 82d0b84
authored
Beginner-friendly function composition
When we introduce function composition, don't use a concise return value line as the first example. I've written a function that does the exact same thing as the original temperature conversion function, complete with comments. I then compare it to the original function below. These two examples show the learner how functions are generated and why the return line can be used more efficiently.1 parent a1256c1 commit 82d0b84
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| |||
0 commit comments