Skip to content
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

有个笔误? #1

Open
ghost opened this issue Mar 2, 2017 · 0 comments
Open

有个笔误? #1

ghost opened this issue Mar 2, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 2, 2017

https://github.com/zforget/translation/blob/master/real_world_ocaml/1_02_variables_and_functions.md

处理包含*的操作符要小心。看下面的例子:

# let (***) x y = (x ** y) ** y;;
Characters 17-18:
Error: This expression has type int but an expression was expected of type float

(* OCaml Utop ∗ variables-and-functions/main.topscript , continued (part 27) ∗ all code )
上面的错误是因为(
*)没有被解析成操作符,而是被看成了注释!要正确工作,我们需要在前面或后面加上括号

应该是加上空格 不是括号

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants