tutorial typed/racket missing function overloading and important tips
Closed this issue · 0 comments
dannypsnl commented
function overloading(case-lambda):
(: a (case-> (-> Number)
(-> Number Number)))
(define a
(case-lambda
[() 0]
[([x : Number]) x]))important tips:
inst: this is important since some builtin function is case-lambda and has polymorphism make provide concrete type be quite important.ann:#{x : Number} 7or(ann x Number) 7