Categories
Programming

99 Problems(3)

Find out whether a list is a palindrome.

(defn ispalindrome? [xs]
	(= xs (reverse xs)))
Categories
Programming

99 Problems(2)

Find the last but one element of a list

(def testlist [1 2 3])
(nth testlist (- (count testlist) 2))
Categories
Programming

99 Problems (1)

Find the last element of a list.

(def testlist [1 2 3])
(last testlist)