getFriends' :: Token
            -> String  -- ^ screen name
            -> Integer -- ^ cursor
            -> IO (Result [TwitterUser])
getFriends' tok screen_name cur = do
    json <- callAPI GET tok "statuses/friends" [ ("screen_name", screen_name)
                                               , ("cursor", show cur)]
    case json >>= decodeFriendsWithCursor of
        Ok (prev, next, users) ->
            if next /= 0
              then do
                users' <- getFriends' tok screen_name next
                return $ (users ++) <$> users'
              else
                return $ Ok users
        Error e -> return $ Error e
getFriends' :: Token
            -> String  -- ^ screen name
            -> Integer -- ^ cursor
            -> IO (Result [TwitterUser])
getFriends' tok screen_name cur = do
    json <- callAPI GET tok "statuses/friends" [ ("screen_name", screen_name)
                                               , ("cursor", show cur)]
    case json >>= decodeFriendsWithCursor of
        Ok (prev, next, users) ->
            if next /= 0
              then do
                users' <- getFriends' tok screen_name next
                return $ (users ++) <$> users'
              else
                return $ Ok users
        Error e -> return $ Error e
getFriends' tok screen_name cur = do
    json <- callAPI GET tok "statuses/friends" [ ("screen_name", screen_name)
                                               , ("cursor", show cur)]
    case json >>= decodeFriendsWithCursor of
        Ok (prev, next, users) ->
            if next /= 0
              then do
                users' <- getFriends' tok screen_name next
                return $ (users ++) <$> users'
              else
                return $ Ok users
        Error e -> return $ Error e