realworldocaml / book

V2 of Real World OCaml
https://dev.realworldocaml.org
Other
1.19k stars 175 forks source link

New comment on block [block-idp7637136] #1217

Closed gregtatcam closed 11 years ago

gregtatcam commented 11 years ago

There is a typo in the example above. The defined function name is "ls_rec" but you invoke it as "all_files".

bactrian commented 11 years ago

This comment references this from milestone alpha5: http://www.realworldocaml.org/alpha5/en/html/lists-and-patterns.html#idp7637136

Context:

The above combination of List.map and List.concat is common enough that there is a function List.concat_map that combines these into one, more efficient operation.
heidihoward commented 11 years ago

yep, just hit the same issue. If I call ls_rec I get the following exception

utop # ls_rec ".";; Exception: (Sys_error "./.opam/4.00.1/build/ocaml/_build/boot/libcamlrun.a: No such file or directory").

Also it took ages to run across the whole system

I tried another (smaller) directory and it work ok

ls_rec "/auto/homes/hh360/Documents";;

bactrian commented 11 years ago

This is a local vs network filesystem problem (it's iterating over the entire Computer Lab homespace), and also traversing symlinks.

On 31 May 2013, at 10:46, Heidi-ann notifications@github.com wrote:

yep, just hit the same issue. If I call ls_rec I get the following exception

utop # ls_rec ".";; Exception: (Sys_error "./.opam/4.00.1/build/ocaml/_build/boot/libcamlrun.a: No such file or directory").

Also it took ages to run across the whole system

I tried another (smaller) directory and it work ok

ls_rec "/auto/homes/hh360/Documents";;

: string Core.Std.List.t = ["/auto/homes/hh360/Documents/error output for opam install lwt.txt"; "/auto/homes/hh360/Documents/openbeacon.txt"; "/auto/homes/hh360/Documents/getting to grips with OPAM"] — Reply to this email directly or view it on GitHub.

yminsky commented 11 years ago

The code I believe does compile now.