documentToBlogPostLinks :: Document -> Int -> [(T.Text, T.Text)]
documentToBlogPostLinks document index =
  let bLinkHref = document !? T.pack ("blogPostLinkHref" ++ show index)
      bLinkText = document !? T.pack ("blogPostLinkText" ++ show index)
  in case (bLinkHref, bLinkText) of
    (Nothing, _) -> []
    (_, Nothing) -> []
    (Just h, Just t) -> (h, t) : documentToBlogPostLinks document (index+1)
documentToBlogPostLinks :: Document -> Int -> [(T.Text, T.Text)]
documentToBlogPostLinks document index =
  let bLinkHref = document !? T.pack ("blogPostLinkHref" ++ show index)
      bLinkText = document !? T.pack ("blogPostLinkText" ++ show index)
  in case (bLinkHref, bLinkText) of
    (Nothing, _) -> []
    (_, Nothing) -> []
    (Just h, Just t) -> (h, t) : documentToBlogPostLinks document (index+1)
documentToBlogPostLinks document index =
  let bLinkHref = document !? T.pack ("blogPostLinkHref" ++ show index)
      bLinkText = document !? T.pack ("blogPostLinkText" ++ show index)
  in case (bLinkHref, bLinkText) of
    (Nothing, _) -> []
    (_, Nothing) -> []
    (Just h, Just t) -> (h, t) : documentToBlogPostLinks document (index+1)