blob: c6a6f93fc868a03d8685abe1cf66b911ade2a89d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
import int;
import list;
import bool;
is_palindrome [] = 1;
is_palindrome [_:[]] = 1;
is_palindrome [x:xs] = if (eq x (last xs)) (is_palindrome (init xs)) 0;
main = is_palindrome [0,42,37,42,0];
|