Closed gitonthescene closed 1 year ago
Also, I don't really understand what condition(pending)
means even after reading the explanation. Is that doc supposed to be visible from the Exercism site or is it a note to exercise writers? As a user, I looked at the tests from the Exercism site and saw this and wondered if it might have something to do with my errors as it seemed mysterious.
[EDIT] I suppose it's the condition
described here, but my reading of the predicate pending
as written in the test doesn't match the description alluded to above.
I've since solved it using string_codes/2
instead so that seems to be the issue. I still think that using set_prolog_flag
should be acceptable.
I don't know anything about Prolog's flags, but if you want to support it on Exercism, it should be somehow supported by the test runner: https://github.com/exercism/prolog-test-runner
test empty_string: failed
This implies that the code doesn't work for all test cases, and a local run of the code confirms that.
I've double checked in the test runner with the below code and that works fine:
:- set_prolog_flag(double_quotes, chars).
works(X) :-
"abc" == [a, b, c].
I'm new to both Prolog and Exercism so it's very possible that this is a misunderstanding on my part, but I wrote this code to solve the isograms problem and am getting the following errors (among others). When I run it on SWISH the query runs just fine.
Is it not recognizing or obeying the
set_prolog_flag
query? I do get the same from the tests if I remove that line (which should be necessary).