Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions intro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def isEven(x: Int): Boolean = x % 2 == 0
def square(x: Int): Int = x * x

def sumOfEvenSquares(max: Int): Int = {
sum(map(filter(iterate(10))(isEven))(square))
sum(map(filter(iterate(max))(isEven))(square))
}
```

Expand All @@ -513,7 +513,7 @@ def isEven(x: Int): Boolean = x % 2 == 0
def square(x: Int): Int = x * x

def sumOfEvenSquares(max: Int): Int = {
(1 to 10)
(1 to max)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 👍

.filter(isEven)
.map(square)
.sum
Expand Down