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