-
status_from_content :: Content -> (Maybe Status)
status_from_content content =
case (reads status_id_data :: [(Integer, String)]) of
[] -> Nothing
parseresult:_ -> Just (Status (fst parseresult) created_at_data all_text user_object)
-
+
where
status_ids = (unique_id content)
first_status_id = get_char_data (status_ids !! 0)
-
+
created_ats = (status_created_at content)
- first_created_at = get_char_data (created_ats !! 0)
+ first_created_at = get_char_data (created_ats !! 0)
texts = (status_text content)
all_text = concat $ catMaybes (map get_char_data texts)
-
+
users = (status_user content)
- first_user = user_from_content (users !! 0)
+ first_user = user_from_content (users !! 0)
get_max_status_id :: [Status] -> Integer
-get_max_status_id statuses =
+get_max_status_id statuses =
maximum status_ids
where
status_ids = map status_id statuses
\ No newline at end of file