diff options
Diffstat (limited to 'prolog/problems/lists/last_elem_2/en.py')
-rw-r--r-- | prolog/problems/lists/last_elem_2/en.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/prolog/problems/lists/last_elem_2/en.py b/prolog/problems/lists/last_elem_2/en.py new file mode 100644 index 0000000..93c7c05 --- /dev/null +++ b/prolog/problems/lists/last_elem_2/en.py @@ -0,0 +1,13 @@ +name = 'last_elem/2' +slug = 'find last element in list' + +description = '''\ +<p><code>last_elem(L, E)</code>: <code>E</code> is the last element of list <code>L</code>.</p> +<pre> +?- last_elem([1,2,3], X). + X = 3. +?- last_elem([3,2,X], 1). + X = 1. +</pre>''' + +hint = {} |