Я пытался переписать:Не может пересекаться "", а unwords использовать в качестве замены для замены друг для друга?
return $ renderHtml $ mconcat $ intersperse " " $ catMaybes links
Который работает просто отлично, в:
return $ renderHtml $ mconcat $ unwords $ catMaybes links
, но она возвращается:
Couldn't match type ‘Char’
with ‘blaze-markup-0.7.0.2:Text.Blaze.Internal.MarkupM()’
Expected type: H.Html
Actual type: Char
In the second argument of ‘($)’, namely
‘mconcat $ unwords $ catMaybes links’
In the second argument of ‘($)’, namely
‘renderHtml $ mconcat $ unwords $ catMaybes links’
In a stmt of a 'do' block:
return $ renderHtml $ mconcat $ unwords $ catMaybes links
Я не самый большой с Haskell еще , но я подумал, что intersperse " "
и unwords
где просто заменяют друг друга?
Edit: В конце концов, я хотел бы выяснить способ использовать unwords
... Выяснить, почему это дает мне ошибку и как я могу работать вокруг него есть цель! =)
Они бывают разных типов. 'mconcat. interperse "" 'вместе являются' unwords'. –
@ н.м. Или просто 'concat. Intersperse "" ' – AJFarmar