blob: 48ee8ac0360ad4639c792d1a891c9b94c7a9c13a (
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 = {}
|