这是我的代码:
type HoraAtendimento = (String, Int, Int)
htmlHAtendimento :: [HoraAtendimento] -> Html
htmlHAtendimento [] = toHtml ""
htmlHAtendimento ((da,hia,hfa):[]) = toHtml da +++ "feira "
+++
show hia +++ "h - " +++ show hfa +++ "h"
htmlHAtendimento ((da,hia,hfa):r) = toHtml da +++ "feira "
+++
show hia +++ "h - " +++ show hfa +++ "h, "
+++
htmlHAtendimento r
我正在寻找一种使用 map 函数并摆脱这个递归函数的方法。这可能吗?如果可以,我该怎么做?