Automating the Web with WebL

By Hannes Marais and Tom Rodeheffer

Dr. Dobb's Journal January 1999

(a)
page = GetURL("http://www.digital.com")
(b)
page = GetURL(
     "http://www.altavista.digital.com/cgi-bin/query",
     [. pg="q", what="web", q="java" .])
(c)
page = GetURL("http://www.altavista.digital.com/") ?
     GetURL("http://www.altavista.yellowpages.com.au")
(d)
page = GetURL("http://www.altavista.digital.com/") |
     GetURL("http://www.altavista.yellowpages.com.au")
(e)
page = Timeout(10000,
     GetURL("http://www.altavista.digital.com/") |
     GetURL("http://www.altavista.yellowpages.com.au"))
(f)
page = Retry(
     GetURL("http://www.altavista.digital.com/") ?
     GetURL("http://www.altavista.yellowpages.com.au"))
(g)
page = Retry(
     GetURL("http://www.digital.com") ?
     Timeout(10000,Stall()))

Example 1: Program fragments using primitive services and service combinators.

Back to Article