summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/palindrome_1/en.py
blob: 7f30f8e5f814969327c18e683526c79df649514d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 = {}