Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f :: [[(a,[b])]] -> Int
- f [(x,xs):[y,ys]] = 0
- f ([_]:[(x,[xs])]:[y,ys]:[]) = 1
- f ([(x,y:_:[])]:[]) = 2
- x0 :: [[(Bool, [Int])]]
- x0 = [[(True,[2,4,6]),(True,[2,4,6]),(True,[2,4,6])]]
- x1 :: [[(Char,[Int])]]
- x1 = [[('a',[2])], [('B',[2])], [('a',[3]), ('D',[4])]]
- x2 :: [[(Int, String)]]
- x2 = [[(1, "ab")]]
- letterize :: String -> [String]
- letterize [] = []
- letterize asd = [head asd]:letterize(tail asd)
- swapElems :: [[a]] -> [[a]]
- swapElems [] = []
- swapElems ([x]:xs) = ([x]: swapElems xs)
- swapElems ((st:nd:ys):xs) = ((nd:st:ys) : swapElems xs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement