module Types where dibble :: Float -> Float dibble x | (x==0) = 42 | (x/=0) = 2.5 * x foolycooly :: Integer -> Integer foolycooly x = x^x test1 :: Integer -> Bool test1 x | (x==0) = True | (foolyOutput == 0) = False | otherwise = True where foolyOutput = foolycooly x test1b :: Integer -> Bool test1b x = (foolyOutput /= 0) where foolyOutput = foolycooly x neverUsed = 1 + 1 + 1 + 1 neck :: [Int] -> Int neck list = head (tail list) -- testing thorax :: [a] -> a thorax cards = head (tail (tail cards)) foot :: [Int] -> Int foot list | ((tail list) == []) = head list | otherwise = foot (tail list) test2 = (foot [1 .. 10] == 10) myCat :: [a] -> [a] -> [a] myCat [] list = list myCat a b = firstA:rest where firstA = head a restA = tail a rest = myCat restA b test :: Int -> Bool test 1 = myCat "Gwen" "EDith" == "GwenEDith"