Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24 lines (15 sloc) 0.403 kB
product' :: Num a => [a] -> a
product' [] = 1
product' (x:xs) = x * product' xs
double :: Num a => a -> a
double x = x + x
quadruple :: Num a => a -> a
quadruple = double . double
last' = head . reverse
last'' xs = xs !! (length xs - 1)
init' = reverse . tail . reverse
init'' xs = take (length xs - 1) xs
swap (x,y) = (y,x)
pair x y = (x,y)
palindrome xs = reverse xs == xs
twice f = f . f
Jump to Line
Something went wrong with that request. Please try again.