#:g1: GOOでL-99 (P06 回文的かを調べる)

Posted 2008-04-06 09:11:00 GMT

-(http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html)
意味なく、回文数にも対応してみました。

(palindrome '(x a m a x)) ;=> #t
(palindrome #(x a m a x)) ;=> #t
(palindrome "xamax")      ;=> #t
(palindrome 12321)        ;=> #t

(dm palindrome (u|<col>) (= u (rev u)))

(dm palindrome (u|<num>) (palindrome (num-to-str u)))


comments powered by Disqus