// demo available at http://terpri.com
(define (alphabet-flickr myletter, alph y myurl) (setq alph (xml-digest (FLICKR "flickr.groups.pools.getPhotos" nil (append "group_id=27034531@N00&tags=" myletter)))) (setq alph (clean nil? (map (lambda(x) (if (= myletter ((x (chop(ref 'title x))) 1)) x)) (\ 2 -1 (alph 0 2))))) (setq y (first (randomize (sequence 0 (length alph))))) (setq y (alph y 1)) (setq myurl (format "http://static.flickr.com/%s/%s_%s_s.jpg" (lookup 'server y)(lookup 'id y)(lookup 'secret y))) (println "<img src=" myurl " border=0>")) (if (= page-name "Home") (begin (println {<div class="flickr_banner">}) (map (lambda (x) (alphabet-flickr x)) '("T" "E" "R" "P" "R" "I")) (println "</div>")))