second xs = head (tail xs) swap (x,y) = (y,x) pair x y = (x,y) mult x y = x * y double = mult 2 palindrome xs = reverse xs == xs twice f x = f (f x)