不,但它们实际上分别只是Data.List.break和的应用程序(优化版本) Data.List.intersperse。
pythonicSplit :: String -> Char -> [String]
pythonicSplit "" _ = []
pythonicSplit s c = let (r,rs) = break (== c) s
in r : pythonicSplit rs c
pythonicJoin :: [String] -> Char -> String
pythonicJoin ss c = intersperse c ss -- or: flip intersperse
Run Code Online (Sandbox Code Playgroud)