Functional JavaScript for crawling the Web