Skip to content
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

Fix tests and exmaple of Anagram #90

Merged
merged 2 commits into from
Mar 31, 2023
Merged

Fix tests and exmaple of Anagram #90

merged 2 commits into from
Mar 31, 2023

Conversation

Average-user
Copy link
Member

It was necessary to change anagram.example since it was not working correctly:

 anagram("galea", ["eagle"], Xs).
Xs = ["eagle"].

I replaced it from my solution in exercism.io. Suggestions are welcomed.

And that was unnoticed because of the problem exposed in #81

Base automatically changed from master to main January 28, 2021 19:19
Comment on lines +1 to +7
is_anagram(A,B) :-
string_lower(A,A1),
string_lower(B,B1),
not(A1 == B1),
string_codes(A1,Ac),
string_codes(B1,Bc),
permutation(Ac,Bc), !.
Copy link
Member

Choose a reason for hiding this comment

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

So nice!

@ErikSchierboom ErikSchierboom merged commit 69095e1 into exercism:main Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants