diff options
author | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-03-12 17:15:59 +0100 |
---|---|---|
committer | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-03-12 17:15:59 +0100 |
commit | e5674c50d1d4a25961d0244198dedbceb2a926e9 (patch) | |
tree | 2e74b1ee312d66fdb14d14c11287c8fafdf3120d /prolog/problems/lists/last_elem_2/common.py | |
parent | d248db88cb8da1b9c2d360f707c923c2bf902545 (diff) |
Hints for last_elem/2 added.
Diffstat (limited to 'prolog/problems/lists/last_elem_2/common.py')
-rw-r--r-- | prolog/problems/lists/last_elem_2/common.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/prolog/problems/lists/last_elem_2/common.py b/prolog/problems/lists/last_elem_2/common.py index 4014b13..8c08d61 100644 --- a/prolog/problems/lists/last_elem_2/common.py +++ b/prolog/problems/lists/last_elem_2/common.py @@ -80,7 +80,8 @@ def hint(code, aux_code): return [{'id': 'base_case'}] # target predicate seems to always be false - if not prolog.engine.ask_truthTO(engine_id, 'last_elem([_,_,_,_,_,_], _)'): + if not prolog.engine.ask_truthTO(engine_id, 'last_elem(_, _)') and \ + not prolog.engine.ask_truthTO(engine_id, 'last_elem([_,_,_,_,_,_], _)'): return [{'id': 'predicate_always_false'}] # base case works, the recursive doesn't (but it doesn't timeout) |