comparison tests/mr.ur @ 1:8de269c09617

Outputting a summary of Marginal Revolution RSS feed
author Adam Chlipala <adam@chlipala.net>
date Tue, 11 Jan 2011 13:17:44 -0500
parents ad85b8813e8a
children ea0ca570c121
comparison
equal deleted inserted replaced
0:ad85b8813e8a 1:8de269c09617
1 fun main () = 1 fun main () =
2 txt <- Feed.fetch "http://feeds.feedburner.com/marginalrevolution/hCQh"; 2 Feed.app (Feed.children
3 (Feed.tag "item" {1 = "rdf:about"})
4 (Feed.tag "title" {}, Feed.tag "content:encoded" {}))
5 (fn ({Attrs = {1 = about}, ...},
6 ({Cdata = title, ...}, {Cdata = content, ...})) =>
7 debug ("URL: " ^ about);
8 (case title of
9 None => return ()
10 | Some title => debug ("Title: " ^ title));
11 case content of
12 None => return ()
13 | Some content => debug ("Content: " ^ content))
14 "http://feeds.feedburner.com/marginalrevolution/hCQh";
3 return <xml> 15 return <xml>
4 {[txt]} 16 See stdout.
5 </xml> 17 </xml>