ch5/

directory
v0.0.0-...-94c99f4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0

Directories

Path Synopsis
Change the findlinks program to traverse the `n.FirstChild` linked list using recursive calls to `visit` instead of a loop.
Change the findlinks program to traverse the `n.FirstChild` linked list using recursive calls to `visit` instead of a loop.
Rewrite `toposort` to use maps instead of slices and eliminate the initial sort.
Rewrite `toposort` to use maps instead of slices and eliminate the initial sort.
The instructor of the linear algebra course decides that calculus is now a prerequisite.
The instructor of the linear algebra course decides that calculus is now a prerequisite.
The `startElement` and `endElement` functions in gopl.io/ch5/outline2 (§5.5) share a global variable, `depth`.
The `startElement` and `endElement` functions in gopl.io/ch5/outline2 (§5.5) share a global variable, `depth`.
Modify crawl to make local copies of the pages it finds, creating directories as necessary.
Modify crawl to make local copies of the pages it finds, creating directories as necessary.
Use the `breadthFirst` function to explore a different structure.
Use the `breadthFirst` function to explore a different structure.
Write variadic functions `max` and `min`, analogous to `sum`.
Write variadic functions `max` and `min`, analogous to `sum`.
Write a variadic version of `strings.Join`.
Write a variadic version of `strings.Join`.
Write a variadic function `ElementsByTagName` that, given an HTML node tree and zero or more names, returns all the elements that match one of those names.
Write a variadic function `ElementsByTagName` that, given an HTML node tree and zero or more names, returns all the elements that match one of those names.
Without changing its behavior, rewrite the fetch function to use defer to close the writable file.
Without changing its behavior, rewrite the fetch function to use defer to close the writable file.
Use `panic` and `recover` to write a function that contains no return statement yet returns a non-zero value.
Use `panic` and `recover` to write a function that contains no return statement yet returns a non-zero value.
Change the findlinks program to traverse the `n.FirstChild` linked list using recursive calls to `visit` instead of a loop.
Change the findlinks program to traverse the `n.FirstChild` linked list using recursive calls to `visit` instead of a loop.
Extend the `visit` function so that it extracts other kinds of links from the document, such as images, scripts, and style sheets.
Extend the `visit` function so that it extracts other kinds of links from the document, such as images, scripts, and style sheets.
Implement `countWordsAndImages`.
Implement `countWordsAndImages`.
Surface computes an SVG rendering of a 3-D surface function.
Surface computes an SVG rendering of a 3-D surface function.
Outline prints the outline of an HTML document tree.
Outline prints the outline of an HTML document tree.
Modify `forEachNode` so that the `pre` and `post` functions return a boolean result indicating whether to continue the traversal.
Modify `forEachNode` so that the `pre` and `post` functions return a boolean result indicating whether to continue the traversal.
Write a function `expand(s string, f func(string) string) string` that replaces each substring `$foo` within `s` by the text returned by `f("foo")`.
Write a function `expand(s string, f func(string) string) string` that replaces each substring `$foo` within `s` by the text returned by `f("foo")`.

Jump to

Keyboard shortcuts

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