Skip to content

Fix errors in Functional Programming #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
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 tutorial/tests/test_11_functional_programming.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def reference_multiples_of_n(my_list: List[int], k: int) -> List[int]:
],
)
def test_multiples_of_n(
function_to_test: Callable[[List[int]], int],
function_to_test: Callable[[List[int], int], int],
my_list: List[int],
k: int,
):
Expand Down Expand Up @@ -242,7 +242,7 @@ def test_exercise4(


def reference_exercise5(words: List[str]) -> List[str]:
return list(filter(lambda x: x == x[::-1] and len(x) > 1, words))
return list(filter(lambda x: len(x) > 1 and x == x[::-1], words))


def test_exercise5(function_to_test: Callable[[List[str]], List[str]]):
Expand Down