summaryrefslogtreecommitdiff
path: root/prolog/problems/lists_advanced/len_2/en.py
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/lists_advanced/len_2/en.py')
-rw-r--r--prolog/problems/lists_advanced/len_2/en.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/prolog/problems/lists_advanced/len_2/en.py b/prolog/problems/lists_advanced/len_2/en.py
index 33b1675..6518eec 100644
--- a/prolog/problems/lists_advanced/len_2/en.py
+++ b/prolog/problems/lists_advanced/len_2/en.py
@@ -15,14 +15,14 @@ plan = ['''\
is of length <code>LenT + 1</code>.</p>
''', '''\
<p>If I take away the head, and the recursion solves this smaller problem (tail), and if I add 1 to the
-result returned by the recursion, then I got the length of the whole list.</p>
+result returned by the recursion, then I get the length of the whole list.</p>
''']
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 the two operands equal (unification). Perhaps by using <code>=</code>
-you can make the predicate <code>conc/3</code> more general (e.g. able to work with output arguments becoming inputs).</p>
+you can make the predicate <code>len/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>
''',
@@ -78,7 +78,7 @@ second operand and only then attempts the unification of both operands.</p>
'forcing_result_onto_recursion': '''
<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>len(T, LenT + 1)</code>? This forces the recursive call to
+<p>Is your recursive call of the form <code>len(Tail, LenTail + 1)</code>? This forces the recursive call to
return the length of <em>the whole</em> list, not just the tail! This will not work. It is your job to
increase by one the result returned by the recursion. In short, add one outside the recursive call.</p>
''',