module test (+) :: !Int !Int -> Int (+) a b = code { addI } (*) :: !Int !Int -> Int (*) a b = code { mulI } (-) :: !Int !Int -> Int (-) a b = code { subI } fac :: Int -> Int fac 0 = 1 fac n = n * fac (n - 1) :: List a = Cons a (List a) | Nil toList :: [a] -> List a toList [] = Nil toList [x:xs] = Cons x (toList xs) length :: (List a) -> Int length Nil = 0 length (Cons _ xs) = 1 + length xs inc :: (Int -> Int) inc = (+) 1 plus :: Int -> (Int -> Int) plus x = \y->(+) x y Start = (fac 5, length (toList [0,1,2,3,4,5]), inc, plus)