-
Notifications
You must be signed in to change notification settings - Fork 367
patch sequence page #1205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patch sequence page #1205
Conversation
|
Thanks @c-cube, am I correct assuming this only about the Sequences documentation and the other files went in this PR accidentally? |
|
This might be the state of staging at the time. |
|
Ok I have no idea what's going on there. I edited from the "contribute" button on the website (URL: https://github.com/ocaml/ocaml.org/blob/c461890f0ce6473bd4faf55b1d7157c1000e0fcb/data/tutorials/ds_05_seq.md) and ended up on a detached commit? |
|
Sorry about that, the contribute link goes to the commit on the |
|
if someone wants to cherry pick the small change… :) |
|
So the diff with No worries, we will take it from here. |
|
Thanks y'all :) |
|
I've updated #791 with what seemed unique to this PR. Changes had taken place in parallel there. Reconciliation was needed. I hope I haven't lost any of your suggestions in the process. Thanks again for your feedback, and apologizes for the unpleasant review experience. staging is up to date w.r.t. #791 |
|
I don't think you lost anything! If anything you attributed too many things to me in the last commit 😅 . I'm closing this. No worries for the reviewing experience, it's never easy to make this kind of things smooth. Cheers! |
christinerose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor grammar/formatting fixes. Tightened some syntax and found a few typos.
| function returning a sequence while its `list` counterpart returns a list. Let's | ||
| compare the constructors of `list` and `Seq.node`: | ||
| 1. Empty lists and sequences are defined the same way, a constructor without any | ||
| parameter: `Seq.Nil` and `[]`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| parameter: `Seq.Nil` and `[]`. | |
| parameters: `Seq.Nil` and `[]`. |
| ```ocaml | ||
| # Seq.iter print_int (ints 0);; | ||
| ``` | ||
| in an OCaml top-level means “print integers forever,” and you have to press |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| in an OCaml top-level means “print integers forever,” and you have to press | |
| in an OCaml toplevel means “print integers forever,” and you have to press |
| The function `sieve` is recursive in OCaml and common sense. It is defined using | ||
| the `rec` keyword and calls itself. However, some call that kind of function | ||
| [_corecursive_](https://en.wikipedia.org/wiki/Corecursion). This word is used to | ||
| emphasize that, by design, it does not terminate. Strictly speaking, the sieve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| emphasize that, by design, it does not terminate. Strictly speaking, the sieve | |
| emphasise that, by design, it does not terminate. Strictly speaking, the sieve |
| * Sequence consumer: partially applied function parameter | ||
| * Sequence producer: partially applied function result | ||
|
|
||
| When code dealing with sequences does not behave as expected like if it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| When code dealing with sequences does not behave as expected like if it is | |
| When code dealing with sequences does not behave as expected, like if it is |
| val String.of_seq : string -> char Seq.t | ||
| val String.to_seq : char Seq.t -> string | ||
| ``` | ||
| Similar functions are also provided for sets, maps, hash tables (`Hashtbl`) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Similar functions are also provided for sets, maps, hash tables (`Hashtbl`) and | |
| Similar functions are also provided for sets, maps, hash tables, (`Hashtbl`) and |
|
|
||
| <p> | ||
| The <a href="<%s Url.tutorial "up-and-running" %>#installing-the-ocaml-platform-tools">OCaml Platform Tools</a>, | ||
| which include the <a target="_blank" href="https://dune.build/">build system <tt>dune</tt></a>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| which include the <a target="_blank" href="https://dune.build/">build system <tt>dune</tt></a>, | |
| which include the <a target="_blank" href="https://dune.build/">build system Dune</a>, |
| <p> | ||
| The <a href="<%s Url.tutorial "up-and-running" %>#installing-the-ocaml-platform-tools">OCaml Platform Tools</a>, | ||
| which include the <a target="_blank" href="https://dune.build/">build system <tt>dune</tt></a>, | ||
| complete your OCaml development environment. To install them in your current <code>opam</code> switch, run this command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| complete your OCaml development environment. To install them in your current <code>opam</code> switch, run this command: | |
| complete your OCaml development environment. To install them in your current opam switch, run this command: |
| <li> | ||
| <h3>Use the Diskuv OCaml ("DKML") Windows installer</h3> | ||
| <p> | ||
| The installer sets up OCaml 4.14.0 and <a target="_blank" href="https://github.com/ocaml/opam">OCaml's package manager <tt>opam</tt></a>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The installer sets up OCaml 4.14.0 and <a target="_blank" href="https://github.com/ocaml/opam">OCaml's package manager <tt>opam</tt></a>, | |
| The installer sets up OCaml 4.14.0 and <a target="_blank" href="https://github.com/ocaml/opam">OCaml's package manager opam</a>, |
| </a> | ||
|
|
||
| <p> | ||
| Before you run the installer: Make sure your Windows username does <b>not</b> contain a space character (e.g. for <code>C:\Users\Jane Smith</code>, OCaml will not install properly). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Before you run the installer: Make sure your Windows username does <b>not</b> contain a space character (e.g. for <code>C:\Users\Jane Smith</code>, OCaml will not install properly). | |
| Before you run the installer: Make sure your Windows username does <b>not</b> contain a space character (e.g., for <code>C:\Users\Jane Smith</code>, OCaml will not install properly). |
| <h2>You have an OCaml Development Environment</h2> | ||
|
|
||
| <p> | ||
| The <a href="<%s Url.tutorial "up-and-running" %>#installing-the-ocaml-platform-tools">OCaml Platform Tools</a> include the <a target="_blank" href="https://dune.build/">build system <tt>dune</tt></a>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The <a href="<%s Url.tutorial "up-and-running" %>#installing-the-ocaml-platform-tools">OCaml Platform Tools</a> include the <a target="_blank" href="https://dune.build/">build system <tt>dune</tt></a>, | |
| The <a href="<%s Url.tutorial "up-and-running" %>#installing-the-ocaml-platform-tools">OCaml Platform Tools</a> include the <a target="_blank" href="https://dune.build/">build system Dune</a>, |
christinerose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor grammar/formatting fixes. Tightened some syntax and found a few typos.
No description provided.