diff options
author | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-08-27 03:31:18 +0200 |
---|---|---|
committer | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-08-27 03:31:18 +0200 |
commit | ca743bffb497dea794950bf2bbda45e3bb4c936b (patch) | |
tree | 726780fbb1e388c845e1c0866d806ffad83f8f9c /prolog/problems/lists_advanced | |
parent | acd5a646f0848bfb4616144119cb7e10d7b41f8f (diff) |
English translation for conc/3 added.
Diffstat (limited to 'prolog/problems/lists_advanced')
-rw-r--r-- | prolog/problems/lists_advanced/rev_2/en.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prolog/problems/lists_advanced/rev_2/en.py b/prolog/problems/lists_advanced/rev_2/en.py index 3b85a74..dbb08a2 100644 --- a/prolog/problems/lists_advanced/rev_2/en.py +++ b/prolog/problems/lists_advanced/rev_2/en.py @@ -25,7 +25,7 @@ and if I assume the recursion reverses tail <code>T</code> into reversed tail <c hint = { 'eq_instead_of_equ': '''\ <p>The operator <code>==</code> is "stricter" than operator <code>=</code> in the sense that -for the latter it is enough to be able to make two elements equal (unification). Perhaps by using <code>=</code> +for the latter it is enough to be able to make the two operands equal (unification). Perhaps by using <code>=</code> you can make the predicate <code>rev/2</code> more general (e.g. able to work with output arguments becoming inputs).</p> <p>Of course, you can also solve the exercise without explicit use of either of these two operators, just remember that unification is implicitly performed with the predicate's arguments (head of clause).</p> @@ -72,7 +72,7 @@ an assigned value)!</p> <p>Don't force the result onto recursion, don't tell it what it should return. Just assume it will do its job. If this assumption is correct, then the rule will work for a larger case.</p> <p>Is your recursive call of the form <code>rev(T, [RevTail|H])</code>? This forces the recursive call to -<emph>return</emph> the head at the end of the list. But it doesn't know of this head, because you just +<em>return</em> the head at the end of the list. But it doesn't know of this head, because you just took it away! Inserting the head into the result, returned by the recursive call, is your job. To put it shortly, insert <code>H</code> outside of the recursive call.</p> ''', |