Closed
Description
Near the bottom of the document there's this example:
Filtering:
# Python
f = lambda x: x if x > 1 else 1
x = filter(f, numbers)
// Scala
val x = numbers.filter(_ > 1)
That first line of Python is wrong.
The correct python for the filter is:
f = lambda x: x > 1
x = filter(f, numbers)
And if you want to more closely mirror the Scala example:
x = tuple(filter(lambda x: x > 1, numbers))
Metadata
Metadata
Assignees
Labels
No labels