Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- z :: [Int] -> Int
- z _ = 0
- n :: [Int] -> Int
- n [x] = x + 1
- n _ = error "Bad argument" {- yep, not very informative, but who fcking cares? -}
- u :: Int -> [Int] -> Int
- u index l
- | index < (length l) = l !! index
- | otherwise = error "Bad index"
- s :: ([Int] -> Int) -> [([Int] -> Int)] -> [Int] -> Int
- s f gl args = f $ map ($args) gl
- r :: ([Int] -> Int) -> ([Int] -> Int) -> Int -> [Int] -> Int
- r f g 0 args = f args
- r f g y args = g $ [y - 1] ++ args ++ [r f g (y - 1) args]
- main = do
- putStrLn "hello"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement