Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Consider a more compelling example for the front page #562

@yminsky

Description

@yminsky

The current front-page example is a nice but impractical finger-exercise. It would be nice to have something more realistic. Here's a kind of example that might be fun, which you could get if you linked in the lambdasoup package:

# let get_hrefs soup =
    Soup.select "a" soup
    |> Soup.to_list
    |> List.map (Soup.R.attribute "href")
  ;;
val get_hrefs : 'a Soup.node -> string list = <fun>
# get_hrefs (Soup.parse {|
     <html><body>
        <a href="https://ocaml.org"> This is a link! </a>
        And here's <a href="https://github.com/ocaml">another one</a>. |});;
- : string list = ["http://ocaml.org"; https://github.com/ocaml"]

I think something like that could be a lot more compelling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions