Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Noel Welsh authored and Noel Welsh committed Sep 10, 2024
1 parent 61de45c commit 3028c62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/src/pages/2-explore/summarize.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def average(a: Double, b: Double): Double =
However, that doesn't help us work with, say, 18 data points (if we sample once per decade), or 173 points (if we sample once per year), or 2082 points (if we include all the data). What we need is a way that works with an arbitrary amount of data, which is what a `List` represents. Here's how we can define `average` on a `List`.

```scala mdoc:silent
define average(data: List[Double]): Double =
def average(data: List[Double]): Double =
data.sum / data.size
```

Expand Down

0 comments on commit 3028c62

Please sign in to comment.