aboutsummaryrefslogtreecommitdiff
path: root/rosetta/palindrome.neb
blob: 198456dc5a92edf24e9bbac1cddcfbe4ecf14146 (plain)
1
2
3
4
5
6
(func palindrome? (str)
    (branch
        ((<= (length str) 1) #true)
        ((eq? (first str) (last str))
            (palindrome? (reverse (rest (reverse (rest str))))))
        (#true #false)))