RosettaCodeData/Task/Test-a-function/PicoLisp/test-a-function.l

6 lines
128 B
Plaintext

(de palindrome? (S)
(= (setq S (chop S)) (reverse S)) )
(test T (palindrome? "racecar"))
(test NIL (palindrome? "ferrari"))