renderGroups :: [GroupScore] -> Html
renderGroups groups = ol $ mapM_ groupHtml $ reverse $ sort groups
    where
    groupHtml :: GroupScore -> Html
    groupHtml gs = li $ do
        a ! href (toValue $ "http://app.strava.com/clubs/" ++ (show $ gid gs)) $ toHtml $ gname gs
        _ <- ": "
        toHtml (groupScore gs)
        _ <- " points ("
        toHtml ((floor :: Double -> Int) $ sum $ map miles $ gscores gs)
        _ <- " miles) "
        renderScores (gscores gs)
renderGroups :: [GroupScore] -> Html
renderGroups groups = ol $ mapM_ groupHtml $ reverse $ sort groups
    where
    groupHtml :: GroupScore -> Html
    groupHtml gs = li $ do
        a ! href (toValue $ "http://app.strava.com/clubs/" ++ (show $ gid gs)) $ toHtml $ gname gs
        _ <- ": "
        toHtml (groupScore gs)
        _ <- " points ("
        toHtml ((floor :: Double -> Int) $ sum $ map miles $ gscores gs)
        _ <- " miles) "
        renderScores (gscores gs)
renderGroups groups = ol $ mapM_ groupHtml $ reverse $ sort groups
    where
    groupHtml :: GroupScore -> Html
    groupHtml gs = li $ do
        a ! href (toValue $ "http://app.strava.com/clubs/" ++ (show $ gid gs)) $ toHtml $ gname gs
        _ <- ": "
        toHtml (groupScore gs)
        _ <- " points ("
        toHtml ((floor :: Double -> Int) $ sum $ map miles $ gscores gs)
        _ <- " miles) "
        renderScores (gscores gs)