Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module A where
- a :: Int -> Int
- a 0 = 0
- a n = x where
- x :: Int
- x = n + 3
- y :: Int
- y = x+1
- sublist :: Int -> Int -> [a] -> [a]
- sublist from to ls = take size (drop from ls)
- where size = to - from + 1
- index :: Int -> Int -> [[a]] -> a
- index i j mx = mx !! i !! j
- concat :: [[a]] - [a]
- concat [] = []
- concat (x:ls) = x ++ concat ls
- splice :: Int -> [a] -> [[a]]
- splice _ [] = []
- splice n ls = take n ls: splice n (drop n ls)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement