在常规球拍中,((curry * 2) 3)按预期工作,6结果。
但是,在 Typed Racket 中:
> ((curry * 2) 3)
; readline-input:3:0: Type Checker: could not apply function;
; wrong number of arguments provided
; expected: 0
; given: 1
; in: ((curry * 2) 3)
; [,bt for context]
Run Code Online (Sandbox Code Playgroud)
为什么?
哪种测试更快:平等还是不平等?
例如,在一个大while循环中,条件是否应该a>0而不是a!=0?
common-lisp ×1
currying ×1
hunchentoot ×1
operators ×1
performance ×1
python ×1
python-3.x ×1
racket ×1
ssl ×1
typed-racket ×1