Skip to content

[list-ops]: change // to / and make have foldl/foldr call func(acc, el), consistent with the problem spec #3405

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

Merged
merged 6 commits into from
May 9, 2023

Conversation

IsaacG
Copy link
Member

@IsaacG IsaacG commented Apr 13, 2023

No description provided.

@BethanyG
Copy link
Member

BethanyG commented May 9, 2023

@IsaacG -- Thank you for this. Pls remember to add yourself as an exercise contributor. After that, I will approve and merge.

@IsaacG
Copy link
Member Author

IsaacG commented May 9, 2023

@IsaacG -- Thank you for this. Pls remember to add yourself as an exercise contributor. After that, I will approve and merge.

Done. Thanks!

@BethanyG BethanyG merged commit 461e6fc into exercism:main May 9, 2023
@asarkar
Copy link

asarkar commented Jun 21, 2023

The arguments to the lambda are inconsistent with the problem description.

foldr (given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right using function(item, accumulator));

    def test_foldr_direction_dependent_function_applied_to_non_empty_list(self):
        self.assertEqual(foldr(lambda acc, el: el / acc, [1, 2, 3, 4], 24), 9)

The first argument to the lambda should be el, not acc.

@BethanyG
Copy link
Member

@asarkar - if you'd like to report an issue, please do so on our forum. A long-closed PR is not the place to do it. Thanks.

@exercism exercism locked as off-topic and limited conversation to collaborators Jun 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants