I apologize; `hasIndex` is a confusing name -- I was thinking of the `ISINDEX` html tag (it creates an html form with a single input field).
The idea is that `hasIndex f` creates a page that prompts for a string, then (after the page is submitted) calls the function f with the input string as parameter and shows the resulting page.
By the way, \ is just the Haskell syntax for lambda -- hey, whaddayaknow, it's one character shorter than `fn` :-)