Set both and equal to list concatenation, with . Associativity gives
xs ++ (ys ++ zs) = (xs ++ ys) ++ zs, which is equation (1). The two identity laws give xs ++ [] = [] ++ xs, which is equation (2). Part (b) therefore yieldsconcat :: [[a]] -> [a]
concat = foldl (++) [] Articles by others on the same topic
There are currently no matching articles.