Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f :: Ord a => [a] -> [a]
- f x = reverse x
- h :: Ord a => [a] -> [a]
- h x = tail x
- g :: Ord a => ([a] -> [a]) -> [a] -> IO ()
- g x y = putStrLn . show $ x y
- main :: IO ()
- main = mapM_ (\(i, j) ->
- case i of
- 0 -> g (j :: [Int] -> [Int]) [1..5]
- 1 -> g (j :: [Char] -> [Char]) "hello"
- ) [(0,f), (1, h)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement