From cf4e59c9d6bce337514fc7d77120baced0d6d7bc Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 17 Mar 2016 14:19:45 +0100 Subject: Prolog: split lists exercises into two groups --- prolog/problems/lists_advanced/palindrome_1/en.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 prolog/problems/lists_advanced/palindrome_1/en.py (limited to 'prolog/problems/lists_advanced/palindrome_1/en.py') 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 = '''\ +

palindrome(L): the elements of list L are the same when read from the front or back of the list.

+
+?- palindrome([1,2,3,2,1]).
+  true.
+?- palindrome([1,2,3]).
+  false.
+
''' + +hint = {} -- cgit v1.2.1