realworldocaml / examples

All the examples in Real World OCaml
The Unlicense
376 stars 81 forks source link

Extra argument of `path` for `String.split_on` was confusing #32

Closed russelldb closed 6 years ago

russelldb commented 9 years ago

If you take the ^> operated code and swap for |> it still fails, since that argument path isn't needed, coming instead from the call to Sys.getenv_exn "PATH". This confused me as I was comparing the two examples.

Or maybe don't use the Sys call at all in the second one, for clarity?

I'm just learning (hence reading the book) so I could be totally wrong, and would be happy to learn how/why.

russelldb commented 6 years ago

I guess not then. I'm tidying up all my dangling PRs. Will close now.