chapter05/

directory
v0.0.0-...-7eebb46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: MIT

Directories

Path Synopsis
Ch05ex01 is a version of findlinks with recursive child traversal instead of a loop.
Ch05ex01 is a version of findlinks with recursive child traversal instead of a loop.
Ch05ex02 builds a mapping from element names to the number of occurrences of that element in an HTML tree.
Ch05ex02 builds a mapping from element names to the number of occurrences of that element in an HTML tree.
Ch05ex03 traverses and HTML tree and prints the content of all text nodes (except contents of script and style elements).
Ch05ex03 traverses and HTML tree and prints the content of all text nodes (except contents of script and style elements).
Ch05ex04 extracts image, script and style sheet links.
Ch05ex04 extracts image, script and style sheet links.
Ch05ex05 fetches the document from the URL specified as an argument and prints word and image count.
Ch05ex05 fetches the document from the URL specified as an argument and prints word and image count.
Ch05ex06 modifies the corner function of the surface program to use named results and a bare return statement.
Ch05ex06 modifies the corner function of the surface program to use named results and a bare return statement.
Ch05ex07 is an HTML pretty printer.
Ch05ex07 is an HTML pretty printer.
Ch05ex08 finds the first element with the given ID in the supplied HTML documents.
Ch05ex08 finds the first element with the given ID in the supplied HTML documents.
Ch05ex09 expands each substring $foo to f(foo).
Ch05ex09 expands each substring $foo to f(foo).
Ch05ex10 rewrites topoSort to use maps instead of slices and eliminates the initial sort.
Ch05ex10 rewrites topoSort to use maps instead of slices and eliminates the initial sort.
Ch05ex11 extends topoSort to report cycles.
Ch05ex11 extends topoSort to report cycles.
Ch05ex12 turns startElement and endElement into anonymous functions sharing a variable local to the outline function.
Ch05ex12 turns startElement and endElement into anonymous functions sharing a variable local to the outline function.
ch05ex13
grablinks
Grablinks makes local copies of the pages it crawls, creating directories as necessary, except for pages from different domains.
Grablinks makes local copies of the pages it crawls, creating directories as necessary, except for pages from different domains.
links
Package links provides a link-extraction function.
Package links provides a link-extraction function.
Ch05ex14 uses breadthFirst to traverse other structures.
Ch05ex14 uses breadthFirst to traverse other structures.
Ch05ex15 implements variadic max and min functions.
Ch05ex15 implements variadic max and min functions.
Ch05ex16 implements strings.Join as a variadic function.
Ch05ex16 implements strings.Join as a variadic function.
Ch05ex17 implements a variadic function that extracts HTML elements by name from an HTML document.
Ch05ex17 implements a variadic function that extracts HTML elements by name from an HTML document.
Ch05ex18 saves the contents of a URL into a local file, using defer to close the file.
Ch05ex18 saves the contents of a URL into a local file, using defer to close the file.
Ch05ex19 implements a function without return statement that returns a non-zero value.
Ch05ex19 implements a function without return statement that returns a non-zero value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL