view tests/mr.ur @ 10:edc2b467f818

Add a version of Feed.app which threads state.
author Karn Kallio <kkallio@eka>
date Thu, 09 Jun 2011 12:59:27 -0430
parents a4e5d053daed
children 0140b1662994
line wrap: on
line source
fun main () =
    doc <- Feed.fetch "http://marginalrevolution.com/feed";

    Feed.app (Feed.children
                  (Feed.tagA "item" ())
                  (Feed.tagC "link", Feed.tagC "title", Feed.tagC "content:encoded"))
             (fn ((), (link, title, content)) =>
                 debug ("URL: " ^ link);
                 debug ("Title: " ^ title);
                 debug ("Content: " ^ content))
             doc;
    return <xml>
      See stdout.
    </xml>