summaryrefslogtreecommitdiff
path: root/prolog/problems/lists_advanced/palindrome_1/en.py
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/lists_advanced/palindrome_1/en.py')
-rw-r--r--prolog/problems/lists_advanced/palindrome_1/en.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/prolog/problems/lists_advanced/palindrome_1/en.py b/prolog/problems/lists_advanced/palindrome_1/en.py
new file mode 100644
index 0000000..48ee8ac
--- /dev/null
+++ b/prolog/problems/lists_advanced/palindrome_1/en.py
@@ -0,0 +1,15 @@
+# coding=utf-8
+
+name = 'palindrome/1'
+slug = 'check if list is a palindrome'
+
+description = '''\
+<p><code>palindrome(L)</code>: the elements of list <code>L</code> are the same when read from the front or back of the list.</p>
+<pre>
+?- palindrome([1,2,3,2,1]).
+ true.
+?- palindrome([1,2,3]).
+ false.
+</pre>'''
+
+hint = {}