echoes :: Foldable t => t Int -> [Int]echoes = foldr (\x xs -> (replicate x x) ++ xs) []echoes' :: [Int] -> [Int]echoes' = foldr (\x xs -> (replicate x x) ++ xs) []> :t echoesechoes :: Foldable t => t Int -> [Int]> :t echoes'echoes' :: [Int] -> [Int] 这篇关于试图了解为什么在Haskell中使用文件夹的此功能无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-17 20:26