Missing hash (#) character in utop example
kerrickstaley opened this issue · 2 comments
kerrickstaley commented
In the Variables and Functions chapter there is the following example showing some expressions entered into utop
and their output:
# let languages = "OCaml,Perl,C++,C"
val languages : string = "OCaml,Perl,C++,C"
# let dashed_languages =
let language_list = String.split languages ~on:',' in
String.concat ~sep:"-" language_list
val dashed_languages : string = "OCaml-Perl-C++-C"
In the PDF version of the book, this gets rendered as:
# let languages = "OCaml,Perl,C++,C" ;;
val languages : string = "OCaml,Perl,C++,C"
let dashed_languages =
let language_list = String.split languages ~on:',' in
String.concat ~sep:"-" language_list
;;
val dashed_languages : string = "OCaml-Perl-C++-C"
It seems that whatever processing step that inserts ;;
into the rendered output is also eliding the #
at the beginning of the third line. I think this symbol should still be there since it represents the utop
prompt.