Yes, it’s concat
from the Standard Prelude, given by
concat :: [[a]] -> [a]
concat xss = foldr (++) [] xss
If you want to turn [[[a]]]
into [a]
, you must use it twice:
Prelude> (concat . concat) [[[1,2],[3]],[[4]]]
[1,2,3,4]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…