I was trying to rewrite:
return $ renderHtml $ mconcat $ intersperse " " $ catMaybes links
Which works just fine, into:
return $ renderHtml $ mconcat $ unwords $ catMaybes links
but it is returning:
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
I'm not the greatest with Haskell yet, but I thought intersperse " "
and unwords
where just drop in replacements for one another?
Edit: Ultimately, I'd like to figure out a way to use unwords
... Figuring out why it's giving me the error and how I can work around it is the goal! =)